Browse Source

Merge branch 'MouseGame' into 'main'

Merge Mouse game into main

See merge request fdai7382/fertigjavagamelauncher!3
remotes/origin/textadventure
fdai7382 2 years ago
parent
commit
596edcd1ec
  1. 61
      JavaGamelauncher/src/main/java/de/hs_fulda/gruppenprojekt/JavaGamelauncher/MouseGame.java

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

@ -1,9 +1,15 @@
package de.hs_fulda.gruppenprojekt.JavaGamelauncher; package de.hs_fulda.gruppenprojekt.JavaGamelauncher;
import java.awt.Color;
import java.awt.EventQueue; import java.awt.EventQueue;
import java.awt.Font;
import javax.swing.JFrame; import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
public class MouseGame extends JFrame { public class MouseGame extends JFrame {
@ -30,9 +36,62 @@ public class MouseGame extends JFrame {
public MouseGame() { public MouseGame() {
//Fensterrahmen Haupt Layout
setTitle("Maze Game");
setBounds(100, 100, 900, 650);
}//end standardkonstruktor
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
setForeground(Color.GRAY);
setBackground(Color.DARK_GRAY);
contentPane.setForeground(new Color(0, 0, 0));
contentPane.setBackground(new Color(128, 128, 128));
JLabel labelStart = new JLabel("Start");
labelStart.setHorizontalAlignment(SwingConstants.CENTER);
labelStart.setFont(new Font("Tahoma", Font.BOLD, 30));
labelStart.setBounds(10, 11, 83, 49);
contentPane.add(labelStart);
JLabel labelZiel = new JLabel("Ziel");
labelZiel.setHorizontalAlignment(SwingConstants.CENTER);
labelZiel.setFont(new Font("Tahoma", Font.BOLD, 30));
labelZiel.setBounds(809, 525, 67, 49);
contentPane.add(labelZiel);
JPanel panel = new JPanel();
panel.setBorder(new LineBorder(new Color(0, 0, 0), 2));
panel.setForeground(new Color(0, 0, 0));
panel.setBounds(103, 11, 696, 569);
contentPane.add(panel);
panel.setLayout(null);
JPanel nordWand = new JPanel();
nordWand.setBackground(new Color(0, 0, 0));
nordWand.setBounds(0, 0, 696, 10);
panel.add(nordWand);
JPanel ostWand = new JPanel();
ostWand.setBackground(new Color(0, 0, 0));
ostWand.setBounds(686, 0, 10, 509);
panel.add(ostWand);
JPanel suedWand = new JPanel();
suedWand.setBackground(new Color(0, 0, 0));
suedWand.setBounds(0, 559, 696, 10);
panel.add(suedWand);
JPanel westWand = new JPanel();
westWand.setBackground(new Color(0, 0, 0));
westWand.setBounds(0, 60, 10, 509);
panel.add(westWand);
}//end standardkonstruktor
}//end class }//end class
Loading…
Cancel
Save