|
@ -23,8 +23,11 @@ public class MouseGame extends JFrame { |
|
|
|
|
|
|
|
|
int resetX = 200; |
|
|
int resetX = 200; |
|
|
int resetY = 170; |
|
|
int resetY = 170; |
|
|
int breite = 900; |
|
|
|
|
|
int hoehe = 650; |
|
|
|
|
|
|
|
|
int breiteFrame = 900; |
|
|
|
|
|
int hoeheFrame = 650; |
|
|
|
|
|
|
|
|
|
|
|
int breitePanel = 696; |
|
|
|
|
|
int hoehePanel = 569; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Launch the application. |
|
|
* Launch the application. |
|
@ -48,7 +51,7 @@ public class MouseGame extends JFrame { |
|
|
|
|
|
|
|
|
//Fensterrahmen Haupt Layout |
|
|
//Fensterrahmen Haupt Layout |
|
|
setTitle("Mouse Game"); |
|
|
setTitle("Mouse Game"); |
|
|
setBounds(100, 100, breite, hoehe); |
|
|
|
|
|
|
|
|
setBounds(100, 100, breiteFrame, hoeheFrame); |
|
|
robot.mouseMove(resetX, resetY); |
|
|
robot.mouseMove(resetX, resetY); |
|
|
|
|
|
|
|
|
contentPane = new JPanel(); |
|
|
contentPane = new JPanel(); |
|
@ -76,7 +79,7 @@ public class MouseGame extends JFrame { |
|
|
JPanel panel = new JPanel(); |
|
|
JPanel panel = new JPanel(); |
|
|
panel.setBorder(new LineBorder(new Color(0, 0, 0), 2)); |
|
|
panel.setBorder(new LineBorder(new Color(0, 0, 0), 2)); |
|
|
panel.setForeground(new Color(0, 0, 0)); |
|
|
panel.setForeground(new Color(0, 0, 0)); |
|
|
panel.setBounds(103, 11, 696, 569); |
|
|
|
|
|
|
|
|
panel.setBounds(103, 11, breitePanel, hoehePanel); |
|
|
contentPane.add(panel); |
|
|
contentPane.add(panel); |
|
|
panel.setLayout(null); |
|
|
panel.setLayout(null); |
|
|
|
|
|
|
|
@ -137,12 +140,12 @@ public class MouseGame extends JFrame { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getBreite() { |
|
|
public int getBreite() { |
|
|
return breite; |
|
|
|
|
|
|
|
|
return breiteFrame; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getHoehe() { |
|
|
public int getHoehe() { |
|
|
return hoehe; |
|
|
|
|
|
|
|
|
return hoeheFrame; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|