From 9a898bd4a4a8095f0f6219e966fa15e718d44150 Mon Sep 17 00:00:00 2001 From: fdai7382 Date: Mon, 30 Jan 2023 11:29:50 +0100 Subject: [PATCH] refactoring: [MouseGame Class]: Auslagern der Breite des Frame-Bounds. --- .../gruppenprojekt/JavaGamelauncher/MouseGame.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java index aeacbb7..34bef8b 100644 --- a/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java +++ b/JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java @@ -23,7 +23,7 @@ public class MouseGame extends JFrame { int resetX = 200; int resetY = 170; - + int breite = 900; /** * Launch the application. @@ -47,7 +47,7 @@ public class MouseGame extends JFrame { //Fensterrahmen Haupt Layout setTitle("Mouse Game"); - setBounds(100, 100, 900, 650); + setBounds(100, 100, breite, 650); robot.mouseMove(resetX, resetY); contentPane = new JPanel(); @@ -133,6 +133,11 @@ public class MouseGame extends JFrame { public int getResetY() { return resetY; } + + + public int getBreite() { + return breite; + } private void reset(JPanel panel) {