Commit 965139f9 authored by 9831111's avatar 9831111 🙂

Add initSettingPanel method.

parent 20ddf1fa
......@@ -28,5 +28,24 @@ public class CreateNewGameFrame extends JFrame {
setVisible(true);
}
public void initSettingPanel() {
settingPanel = new JPanel();
gameDetailsPanel = new JPanel();
gameDetailsPanel.setBackground(Color.white);
gameDetailsPanel.setLayout(new GridLayout(3, 2));
settingPanel.setBackground(Color.white);
settingPanel.setLayout(new BorderLayout());
tankHealthSlider = new JSlider(10, 100, 40);
shotDamageSlider = new JSlider(10, 100, 80);
destructibleWallSlider = new JSlider(10, 100, 20);
sliderAndIcon(tankHealthSlider, "pictures/tankHealth.png");
sliderAndIcon(shotDamageSlider, "pictures/shotDamage.png");
sliderAndIcon(destructibleWallSlider,"pictures/DestructibleWall.png");
add(settingPanel);
settingPanel.add(gameDetailsPanel, BorderLayout.CENTER);
}
}
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