From 16edbfd44c12226cc8f6dd5ce117484fc5385368 Mon Sep 17 00:00:00 2001 From: Kristian Knarvik Date: Tue, 20 Feb 2018 17:45:30 +0100 Subject: [PATCH] Fixes issue #2 --- src/net/knarcraft/serverlauncher/userinterface/GUI.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/net/knarcraft/serverlauncher/userinterface/GUI.java b/src/net/knarcraft/serverlauncher/userinterface/GUI.java index 64935c3..268032c 100644 --- a/src/net/knarcraft/serverlauncher/userinterface/GUI.java +++ b/src/net/knarcraft/serverlauncher/userinterface/GUI.java @@ -286,6 +286,7 @@ public class GUI implements ActionListener { targetServer = new JComboBox<>(); sl_panel_1.putConstraint(SpringLayout.NORTH, targetServer, 10, SpringLayout.NORTH, controlServers); controlServers.add(targetServer); + targetServer.addActionListener(this); targetPlayer = new JComboBox<>(); sl_panel_1.putConstraint(SpringLayout.NORTH, targetPlayer, 6, SpringLayout.SOUTH, targetServer); @@ -508,6 +509,8 @@ public class GUI implements ActionListener { background(); } else if (e.getSource() == chckbxmntmDelayStartup) { delay(); + } else if (e.getSource() == targetServer) { + updatePlayers(); } else if (e.getSource() == chckbxmntmDownloadJars) { downloadJars(); } else if (e.getSource() == mntmErrors) { @@ -752,7 +755,9 @@ public class GUI implements ActionListener { targetPlayer.removeAllItems(); selectedServerValue = selectedServer.toString(); if (selectedServerValue.equals("All")) { - for (String player : this.globalPlayers) targetPlayer.addItem(player); + for (String player : this.globalPlayers) { + targetPlayer.addItem(player); + } } else { for (String player : Profile.getCurrent().getCollection(selectedServerValue).getServer().getPlayers()) { targetPlayer.addItem(player);