|
@ -1,5 +1,8 @@ |
|
|
|
|
|
import PingPong.GamePanel; |
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
import javax.swing.*; |
|
|
import java.awt.*; |
|
|
import java.awt.*; |
|
|
|
|
|
import java.awt.event.KeyListener; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class MenuPanel extends JPanel { |
|
|
public class MenuPanel extends JPanel { |
|
@ -9,4 +12,23 @@ public class MenuPanel extends JPanel { |
|
|
this.setBackground(Color.BLACK); |
|
|
this.setBackground(Color.BLACK); |
|
|
this.setFocusable(true); |
|
|
this.setFocusable(true); |
|
|
this.setPreferredSize(GamePanel.SCREEN); |
|
|
this.setPreferredSize(GamePanel.SCREEN); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void paintComponent(Graphics g) { |
|
|
|
|
|
super.paintComponent(g); |
|
|
|
|
|
draw(g); |
|
|
|
|
|
} |
|
|
|
|
|
public void draw(Graphics g) { |
|
|
|
|
|
g.setColor(Color.WHITE); |
|
|
|
|
|
g.setFont(new Font("Consolas", Font.BOLD, 70)); |
|
|
|
|
|
g.drawString("GAME MENU", 330, 100); |
|
|
|
|
|
g.setFont(new Font("Consolas", Font.BOLD, 30)); |
|
|
|
|
|
g.drawString("Press 'ENTER' to start the game", 265, 200); |
|
|
|
|
|
g.setFont(new Font("Consolas", Font.PLAIN, 10)); |
|
|
|
|
|
g.drawString("Created by Hells Gamers", 450, 450); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public class AL implements KeyListener { |
|
|
|
|
|
} |
|
|
} |
|
|
} |