public class GuiUtil extends Object
Constructor and Description |
---|
GuiUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
center(Component componentToMove,
Component componentToCenterOn)
Centers the first component on the second
|
static void |
centerOnScreen(Component componentToMove)
Centers the component on the screen
|
static void |
centerOnWindow(Component componentToMove)
Centers the component on its window
|
static void |
commitChanges(JTable table) |
static void |
formatTooltip(JComponent jcomponent)
Changes the tooltip text of the JComponent to be multiline HTML.
|
static void |
formatTooltips(Container container)
Changes the tooltip text of each component in the Container to be
multiline HTML.
|
static File[] |
getSelectedFiles(JFileChooser chooser)
Workaround for Swing bug: JFileChooser does not support multi-file selection
See Sun bug database 4218431.
|
static void |
invokeAndWait(Runnable r)
Runs r in the event dispatch thread, which may be the current thread.
|
static void |
show(JInternalFrame internalFrame,
JDesktopPane desktopPane)
Workaround for bug: can't re-show internal frames.
|
public static void center(Component componentToMove, Component componentToCenterOn)
public static void centerOnScreen(Component componentToMove)
public static void centerOnWindow(Component componentToMove)
public static void commitChanges(JTable table)
public static void show(JInternalFrame internalFrame, JDesktopPane desktopPane) throws PropertyVetoException
PropertyVetoException
public static File[] getSelectedFiles(JFileChooser chooser)
public static void formatTooltips(Container container)
public static void formatTooltip(JComponent jcomponent)
public static void invokeAndWait(Runnable r) throws InterruptedException, InvocationTargetException
Copyright © 2020. All Rights Reserved.