start game stuff - both online and offline #13
|
@ -61,13 +61,18 @@ public class JoinGame extends JPanel {
|
||||||
add(backButton);
|
add(backButton);
|
||||||
|
|
||||||
backButton.addActionListener(e -> frame.showPanel("MultiplayerGame"));
|
backButton.addActionListener(e -> frame.showPanel("MultiplayerGame"));
|
||||||
losButton.addActionListener(e -> frame.showPanel("Verbinden"));
|
// losButton.addActionListener(e -> frame.showPanel("Verbinden"));
|
||||||
|
|
||||||
|
|
||||||
losButton.addActionListener(new ActionListener() {
|
losButton.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
|
||||||
String ipAddress = ipTextField.getText();
|
String ipAddress = ipTextField.getText();
|
||||||
|
if (ipAddress.equals("")) {
|
||||||
|
ipAddress = "0.0.0.0";
|
||||||
|
}
|
||||||
|
|
||||||
String portText = portTextField.getText();
|
String portText = portTextField.getText();
|
||||||
|
|
||||||
int port = Integer.parseInt(portText);
|
int port = Integer.parseInt(portText);
|
||||||
|
|
Loading…
Reference in New Issue