public final class SwingHelper extends Object
Constructor and Description |
---|
SwingHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
centerOnScreen(Component component)
Centers the Component on screen.
|
static void |
configureCancelForDialog(JDialog dialog,
JButton cancelButton)
This method configures a standard Cancel action, bound to the ESC key, to dispose of the dialog,
and sets the buttons action to be this action, and adds the action to the dialog's rootPane
action map
|
static void |
invokeOnEDT(Runnable runnable) |
static boolean |
isMacOSX() |
static List |
orderOKCancelButtons(JButton okButton,
JButton cancelButton) |
static File |
promptForFile(Container parent,
String defaultPath,
String title,
boolean loadDialog) |
public static void centerOnScreen(Component component)
component
- public static void configureCancelForDialog(JDialog dialog, JButton cancelButton)
dialog
- cancelButton
- public static void invokeOnEDT(Runnable runnable)
public static boolean isMacOSX()
public static List orderOKCancelButtons(JButton okButton, JButton cancelButton)
Copyright © 2002-2018 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.