keep selected

This commit is contained in:
Ralf Wisser
2021-10-13 11:47:17 +02:00
parent 8b8e46f0d7
commit c87e38ffce
@@ -203,8 +203,12 @@ public class DbConnectionSettings extends javax.swing.JPanel {
tb.setHorizontalTextPosition(SwingConstants.CENTER);
tbs.add(tb);
tb.addActionListener(e -> {
tbs.forEach(t -> { if (t != tb) { t.setSelected(false); }});
dbmsComboBox.setSelectedItem(line);
if (tb.isSelected()) {
tbs.forEach(t -> { if (t != tb) { t.setSelected(false); }});
dbmsComboBox.setSelectedItem(line);
} else {
tb.setSelected(true);
}
});
GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = i % 6;