Browse Source

HA10 fertig und hochgeladen

master
Jannik Niebuhr 3 years ago
parent
commit
096a3f8ee3
  1. 3
      spaceinvaders/GameProject/bin/log4j2.xml
  2. BIN
      spaceinvaders/GameProject/bin/ui/GameUIWithLogin.class
  3. BIN
      spaceinvaders/GameProject/bin/ui/LoginWindow.class
  4. 14
      spaceinvaders/GameProject/log/log4j.log
  5. 3
      spaceinvaders/GameProject/src/log4j2.xml
  6. 12
      spaceinvaders/GameProject/src/ui/GameUIWithLogin.java
  7. 3
      spaceinvaders/GameProject/src/ui/LoginWindow.java

3
spaceinvaders/GameProject/bin/log4j2.xml

@ -23,6 +23,9 @@
<Logger name="base.GameLoop" level="info">
</Logger>
<Logger name="ui" level="info">
</Logger>
<Logger name="playground" level="info">
</Logger>

BIN
spaceinvaders/GameProject/bin/ui/GameUIWithLogin.class

BIN
spaceinvaders/GameProject/bin/ui/LoginWindow.class

14
spaceinvaders/GameProject/log/log4j.log

@ -5568,3 +5568,17 @@
2022-07-01 11:16:20,950 INFO base.GameLoop - GUI starts
2022-07-01 11:17:51,360 INFO base.GameLoop - GUI starts
2022-07-01 18:39:59,465 INFO base.GameLoop - GUI starts
2022-07-01 20:54:00,492 INFO base.GameLoop - GUI starts
2022-07-01 20:56:57,120 INFO base.GameLoop - GUI starts
2022-07-01 21:08:58,354 INFO base.GameLoop - GUI starts
2022-07-01 21:08:59,116 INFO ui.GameUIWithLogin - added new MenuItem
2022-07-01 21:09:01,012 INFO ui.GameUIWithLogin - added new MenuItem
2022-07-01 21:09:33,906 INFO base.GameLoop - GUI starts
2022-07-01 21:09:34,693 INFO ui.GameUIWithLogin - added new MenuItem
2022-07-01 21:09:36,524 INFO ui.GameUIWithLogin - added new MenuItem
2022-07-01 21:10:11,496 INFO base.GameLoop - GUI starts
2022-07-01 21:10:12,218 INFO ui.GameUIWithLogin - added new MenuItem
2022-07-01 21:10:15,314 INFO ui.GameUIWithLogin - added new MenuItem
2022-07-01 21:11:12,787 INFO base.GameLoop - GUI starts
2022-07-01 21:11:13,582 INFO ui.GameUIWithLogin - added new MenuItem
2022-07-01 21:11:26,152 INFO ui.GameUIWithLogin - added new MenuItem

3
spaceinvaders/GameProject/src/log4j2.xml

@ -23,6 +23,9 @@
<Logger name="base.GameLoop" level="info">
</Logger>
<Logger name="ui" level="info">
</Logger>
<Logger name="playground" level="info">
</Logger>

12
spaceinvaders/GameProject/src/ui/GameUIWithLogin.java

@ -1,11 +1,8 @@
package ui;
import java.util.*;
import javax.swing.*;
import playground.Playground;
import javax.swing.*;
import java.awt.event.*;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
@ -15,12 +12,15 @@ public class GameUIWithLogin extends GameUI {
protected JMenuItem loginItem;
private static Logger logger = LogManager.getLogger(GameUIWithLogin.class);
public GameUIWithLogin(int sizeX, int sizeY) {
super(sizeX, sizeY);
this.loginItem = new JMenuItem("Login...");
this.loginItem.addActionListener(this);
this.gameMenu.add(loginItem, 0);
logger.info("added new MenuItem");
}
@ -28,9 +28,7 @@ public class GameUIWithLogin extends GameUI {
public void actionPerformed(ActionEvent ae) {
super.actionPerformed(ae);
if(ae.getSource() == this.loginItem) {
LoginWindow login = new LoginWindow(0,0);
new LoginWindow(0,0);
}
}

3
spaceinvaders/GameProject/src/ui/LoginWindow.java

@ -1,13 +1,10 @@
package ui;
import java.util.*;
import javax.swing.*;
import playground.Playground;
import java.awt.event.*;
public class LoginWindow extends GameUIWithLogin implements ActionListener {
JFileChooser fc;
JFrame frame = null;
JPanel contentPane = null;
JTextField tf1 = null;

Loading…
Cancel
Save