You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
752 B
29 lines
752 B
package ui;
|
|
import java.awt.event.ActionEvent;
|
|
import javax.swing.JMenu;
|
|
import javax.swing.JMenuItem;
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
|
public class GameUIWithLogin extends GameUI {
|
|
private static Logger logger = LogManager.getLogger(GameUIWithLogin.class);
|
|
JMenuItem login = new JMenuItem("login");
|
|
|
|
public GameUIWithLogin(int sizeX, int sizeY) {
|
|
super(sizeX, sizeY);
|
|
logger.info("Konstruktor wurde aufgerufen.");
|
|
|
|
login.addActionListener(this);
|
|
this.gameMenu.insert(login, 0);
|
|
}
|
|
|
|
public void actionPerformed(ActionEvent ae) {
|
|
super.actionPerformed(ae);
|
|
if (ae.getSource() == this.login) {
|
|
new LoginWIndow();
|
|
logger.info("Wird aufgerufen.");
|
|
}
|
|
}
|
|
}
|