From 18bea86a3d542cc293d0b5b90d4800971c203d46 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Mon, 25 Feb 2019 15:44:43 +0100 Subject: [client] properly enable custom sat field --- .../dozmod/gui/window/SatelliteListWindow.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java index c71b2d0e..e3f68295 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/SatelliteListWindow.java @@ -50,6 +50,19 @@ public class SatelliteListWindow extends SatelliteListWindowLayout implements Ui } } }; + + // deactivate the custom field when selecting a satellite to make things clearer for user + ActionListener listener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + txtCustomAddress.setEnabled(rdoCusomAddress.isSelected()); + } + }; + for (JRadioButton radio : radioToSat.keySet()) { + radio.addActionListener(listener); + } + rdoCusomAddress.addActionListener(listener); + // Check, whether we have any satellites String lastSat = Config.getLastSatellite(); if (satList != null && !satList.isEmpty()) { @@ -75,19 +88,6 @@ public class SatelliteListWindow extends SatelliteListWindowLayout implements Ui txtCustomAddress.requestFocus(); } - // deactivate the custom field when selecting a satellite to make things clearer for user - ActionListener listener = new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - txtCustomAddress.setEnabled(rdoCusomAddress.isSelected()); - } - }; - for (JRadioButton radio : radioToSat.keySet()) { - radio.addActionListener(listener); - } - rdoCusomAddress.addActionListener(listener); - txtCustomAddress.setEnabled(false); - // Cancel button btnCancel.addActionListener(new ActionListener() { @Override -- cgit v1.2.3-55-g7522