Browse Source

create game screen methode and add main text panel

master
Yazan Alaamer 2 years ago
parent
commit
11f315aeec
  1. 9
      src/main/java/game/StartDarkSoulsGame.java

9
src/main/java/game/StartDarkSoulsGame.java

@ -16,6 +16,7 @@ public class StartDarkSoulsGame {
JPanel titleNamePanel; JPanel titleNamePanel;
JLabel titelNameLabel; JLabel titelNameLabel;
JPanel StartButtonPanel; JPanel StartButtonPanel;
JPanel mainTextPanel; // comit (7) create maintextpanel
Font titelFont = new Font("Times new Roma", Font.PLAIN, 90); Font titelFont = new Font("Times new Roma", Font.PLAIN, 90);
JButton startButton; // commit (5) create start button JButton startButton; // commit (5) create start button
Container con; Container con;
@ -45,7 +46,13 @@ public class StartDarkSoulsGame {
StartButtonPanel.add(startButton); StartButtonPanel.add(startButton);
con.add(titleNamePanel); con.add(titleNamePanel);
con.add(StartButtonPanel); // commit 4 create start button panel
con.add(StartButtonPanel);
} }
public void createGameScreen() {
mainTextPanel = new JPanel();
mainTextPanel.setBounds(100, 100, 600,250);
mainTextPanel.setBackground(Color.red);
con.add(mainTextPanel);
}
} }
Loading…
Cancel
Save