From 2e033a4e84857f2560bdc7e31506663fc279075d Mon Sep 17 00:00:00 2001 From: DieGurke <55625494+DieGurke@users.noreply.github.com> Date: Sat, 21 Dec 2019 18:05:31 +0100 Subject: [PATCH] Revised Cancel and Save Buttons * Fixed weird gbl_buttonPane declaration. * Added correct resizing and repositioning of cancel and save buttons when resizing the settings window. * Fixed incorrect buttonName displaying. --- .../java/envoy/client/ui/settings/SettingsScreen.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/envoy/client/ui/settings/SettingsScreen.java b/src/main/java/envoy/client/ui/settings/SettingsScreen.java index 6655767..29bbe92 100644 --- a/src/main/java/envoy/client/ui/settings/SettingsScreen.java +++ b/src/main/java/envoy/client/ui/settings/SettingsScreen.java @@ -118,10 +118,10 @@ public class SettingsScreen extends JDialog { // ButtonPane GridBagLayout gbl_buttonPane = new GridBagLayout(); - gbl_buttonPane.columnWidths = new int[] { 100, 250, 100, 0 }; - gbl_buttonPane.rowHeights = new int[] { 25, 0 }; - gbl_buttonPane.columnWeights = new double[] { 0.0, 0.0, 0.0, Double.MIN_VALUE }; - gbl_buttonPane.rowWeights = new double[] { 0.0, Double.MIN_VALUE }; + gbl_buttonPane.columnWidths = new int[] { 1, 1}; + gbl_buttonPane.rowHeights = new int[] { 25}; + gbl_buttonPane.columnWeights = new double[] { 1.0, 1.0}; + gbl_buttonPane.rowWeights = new double[] { 0.0}; getContentPane().add(buttonPane, BorderLayout.SOUTH); buttonPane.setLayout(gbl_buttonPane);