Browse Source

refactoring: [MouseGame Class]: Auslagern und umbenennen der Methode

reset.
remotes/origin/MouseGame
fdai7382 2 years ago
parent
commit
d522172607
  1. 12
      JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java

12
JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java

@ -77,7 +77,7 @@ public class MouseGame extends JFrame {
panel.setLayout(null);
JPanel nordWand = new JPanel();
extracted(nordWand);
reset(nordWand);
nordWand.setBackground(new Color(0, 0, 0));
nordWand.setBounds(0, 0, 696, 10);
panel.add(nordWand);
@ -97,10 +97,10 @@ public class MouseGame extends JFrame {
westWand.setBounds(0, 60, 10, 509);
panel.add(westWand);
JPanel panel_1 = new JPanel();
panel_1.setBounds(801, 518, 83, 62);
extracted(panel_1);
contentPane.add(panel_1);
JPanel zielFeld = new JPanel();
reset(zielFeld);
zielFeld.setBounds(801, 518, 83, 62);
contentPane.add(zielFeld);
@ -108,7 +108,7 @@ public class MouseGame extends JFrame {
}//end standardkonstruktor
private void extracted(JPanel panel) {
private void reset(JPanel panel) {
panel.addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {

Loading…
Cancel
Save