From 432dc08f51f5715ab84e1516fef9c3c3b1173433 Mon Sep 17 00:00:00 2001 From: Stian Grenborgen Date: Tue, 16 Jul 2024 08:47:17 +0200 Subject: [PATCH] Fixes the ok button focus. --- src/net/sf/freecol/client/gui/dialog/EndTurnDialog.java | 2 +- src/net/sf/freecol/client/gui/dialog/FirstContactDialog.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sf/freecol/client/gui/dialog/EndTurnDialog.java b/src/net/sf/freecol/client/gui/dialog/EndTurnDialog.java index 4cbeb9e092..98aa30374a 100644 --- a/src/net/sf/freecol/client/gui/dialog/EndTurnDialog.java +++ b/src/net/sf/freecol/client/gui/dialog/EndTurnDialog.java @@ -116,7 +116,7 @@ public void valueChanged(ListSelectionEvent e) { add(text, "newline 20, growx, shrinkx, wmin 100"); add(listScroller, "newline 10, grow, shrink"); - final JButton okButton = Utility.localizedButton("ok").withButtonStyle(ButtonStyle.IMPORTANT); + okButton = Utility.localizedButton("ok").withButtonStyle(ButtonStyle.IMPORTANT); okButton.addActionListener(ae -> { getGUI().removeComponent(this); getFreeColClient().getInGameController().endTurn(false); diff --git a/src/net/sf/freecol/client/gui/dialog/FirstContactDialog.java b/src/net/sf/freecol/client/gui/dialog/FirstContactDialog.java index d0747b5e28..c8b86acea8 100644 --- a/src/net/sf/freecol/client/gui/dialog/FirstContactDialog.java +++ b/src/net/sf/freecol/client/gui/dialog/FirstContactDialog.java @@ -91,7 +91,7 @@ public FirstContactDialog(FreeColClient freeColClient, Player player, Player oth add(image); add(text, "grow, wmin 100"); - final JButton okButton = Utility.localizedButton("yes").withButtonStyle(ButtonStyle.IMPORTANT); + okButton = Utility.localizedButton("yes").withButtonStyle(ButtonStyle.IMPORTANT); okButton.addActionListener(ae -> { getGUI().removeComponent(this); handler.handle(Boolean.TRUE);