|
@ -23,7 +23,7 @@ public class MouseGame extends JFrame { |
|
|
|
|
|
|
|
|
int resetX = 200; |
|
|
int resetX = 200; |
|
|
int resetY = 170; |
|
|
int resetY = 170; |
|
|
|
|
|
|
|
|
|
|
|
int breite = 900; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Launch the application. |
|
|
* Launch the application. |
|
@ -47,7 +47,7 @@ public class MouseGame extends JFrame { |
|
|
|
|
|
|
|
|
//Fensterrahmen Haupt Layout |
|
|
//Fensterrahmen Haupt Layout |
|
|
setTitle("Mouse Game"); |
|
|
setTitle("Mouse Game"); |
|
|
setBounds(100, 100, 900, 650); |
|
|
|
|
|
|
|
|
setBounds(100, 100, breite, 650); |
|
|
robot.mouseMove(resetX, resetY); |
|
|
robot.mouseMove(resetX, resetY); |
|
|
|
|
|
|
|
|
contentPane = new JPanel(); |
|
|
contentPane = new JPanel(); |
|
@ -135,6 +135,11 @@ public class MouseGame extends JFrame { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getBreite() { |
|
|
|
|
|
return breite; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void reset(JPanel panel) { |
|
|
private void reset(JPanel panel) { |
|
|
panel.addMouseListener(new MouseAdapter() { |
|
|
panel.addMouseListener(new MouseAdapter() { |
|
|
@Override |
|
|
@Override |
|
|