Commit 34d67f13 authored by 9831111's avatar 9831111 🙂

Add SettingFrame class.

parent 318f6fed
......@@ -114,6 +114,7 @@ public class CreateNewGameFrame extends JFrame {
settingPanel.add(optionPanel, BorderLayout.SOUTH);
}
class OkButtonAction implements ActionListener {
@Override
......@@ -125,6 +126,7 @@ public class CreateNewGameFrame extends JFrame {
new OnlineModeFrame();
}
}
public void writeToFile(String dataToWrite) {
File file = new File("Games.txt");
try (FileWriter fileWriter = new FileWriter(file, true)) {
......
import javax.swing.*;
import java.awt.*;
public class SettingFrame extends JFrame {
private JPanel settingPanel;
private JPanel serverPanel;
private JPanel gameDetailsPanel;
private JPanel userInformationPanel;
private JLabel tankLabel;
private JLabel tankPhoto;
private ImageIcon tank;
public SettingFrame() {
setBackground(Color.WHITE);
setResizable(false);
setLayout(new GridLayout(1, 2));
setBounds(400, 200, 900, 600);
initUserInformationPanel();
initSettingPanel();
setVisible(true);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment