From 3f815a0c70e9f1fff062f853ed3863399389d609 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Tue, 1 Jan 2013 09:39:06 +0000 Subject: [PATCH] Made the "Continue" buttont he default button of the new setting dialog box git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10051 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/desktop/com/jme3/app/SettingsDialog.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/src/desktop/com/jme3/app/SettingsDialog.java b/engine/src/desktop/com/jme3/app/SettingsDialog.java index 72a687897..434422489 100644 --- a/engine/src/desktop/com/jme3/app/SettingsDialog.java +++ b/engine/src/desktop/com/jme3/app/SettingsDialog.java @@ -238,10 +238,10 @@ public final class SettingsDialog extends JDialog { */ public void showDialog() { setLocationRelativeTo(null); - setVisible(true); + setVisible(true); toFront(); } - + /** * init creates the components to use the dialog. */ @@ -272,7 +272,7 @@ public final class SettingsDialog extends JDialog { setTitle(MessageFormat.format(resourceBundle.getString("frame.title"), source.getTitle())); // The buttons... - JButton ok = new JButton(resourceBundle.getString("button.ok")); + JButton ok = new JButton(resourceBundle.getString("button.ok")); JButton cancel = new JButton(resourceBundle.getString("button.cancel")); icon = new JLabel(imageFile != null ? new ImageIcon(imageFile) : null); @@ -403,7 +403,7 @@ public final class SettingsDialog extends JDialog { gbc.gridwidth = 2; gbc.gridy = 4; gbc.anchor = GridBagConstraints.EAST; - mainPanel.add(ok, gbc); + mainPanel.add(ok, gbc); gbc = new GridBagConstraints(); gbc.insets = new Insets(4, 16, 4, 4); gbc.gridx = 2; @@ -422,7 +422,7 @@ public final class SettingsDialog extends JDialog { pack(); - + mainPanel.getRootPane().setDefaultButton(ok); SwingUtilities.invokeLater(new Runnable() { public void run() { @@ -440,7 +440,7 @@ public final class SettingsDialog extends JDialog { updateAntialiasChoices(); colorDepthCombo.setSelectedItem(source.getBitsPerPixel() + " bpp"); } - }); + }); }