start game stuff - both online and offline #13

Merged
lgc merged 24 commits from start-game into main 2024-12-13 16:27:43 +00:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit ffa04a50cb - Show all commits

View File

@ -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);