From d9a892aae48c87b646b60e4af160f37fa06c035c Mon Sep 17 00:00:00 2001 From: Berkan Sarp Date: Wed, 1 Feb 2023 01:12:07 +0100 Subject: [PATCH] update GamePanel --- src/main/java/GamePanel.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/GamePanel.java b/src/main/java/GamePanel.java index 6079a5e..7e982fb 100644 --- a/src/main/java/GamePanel.java +++ b/src/main/java/GamePanel.java @@ -1,3 +1,11 @@ +import javax.swing.*; import java.awt.*; -public class GamePanel { +public class GamePanel extends JPanel implements Runnable { + static final int FRAME_WIDTH = 1000; + static final int FRAME_HEIGHT = (int) (FRAME_WIDTH * 0.5); + static final int BALL_DIAMETER = 26; + static final int PADDLE_WIDTH = 25; + static final int PADDLE_HEIGHT = 100; + static final Dimension SCREEN = new Dimension(FRAME_WIDTH, FRAME_HEIGHT); +}