Browse Source

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

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

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

@ -77,30 +77,30 @@ 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);
JPanel suedWand = new JPanel();
JPanel suedWand = new JPanel();
suedWand.setBackground(new Color(0, 0, 0));
suedWand.setBounds(0, 559, 696, 10);
panel.add(suedWand);
JPanel ostWand = new JPanel();
JPanel ostWand = new JPanel();
ostWand.setBackground(new Color(0, 0, 0));
ostWand.setBounds(686, 0, 10, 509);
panel.add(ostWand);
JPanel westWand = new JPanel();
JPanel westWand = new JPanel();
westWand.setBackground(new Color(0, 0, 0));
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