From 17e6618a7c5c771be3311ce8cdc540f677fe7a6f Mon Sep 17 00:00:00 2001 From: Berkan Sarp Date: Tue, 31 Jan 2023 23:39:55 +0100 Subject: [PATCH] Update add Graphics --- src/main/java/GamePanel.java | 3 ++- src/main/java/MenuPanel.java | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/GamePanel.java b/src/main/java/GamePanel.java index 3311fd3..6079a5e 100644 --- a/src/main/java/GamePanel.java +++ b/src/main/java/GamePanel.java @@ -1,2 +1,3 @@ +import java.awt.*; + public class GamePanel { -} diff --git a/src/main/java/MenuPanel.java b/src/main/java/MenuPanel.java index d505047..3d0d021 100644 --- a/src/main/java/MenuPanel.java +++ b/src/main/java/MenuPanel.java @@ -12,4 +12,14 @@ public class MenuPanel extends JPanel { 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); + } \ No newline at end of file