Package gr.zeus.util
Class GUIUtils
java.lang.Object
gr.zeus.util.GUIUtils
GUI Helper class, contains static methods that are used all the time.
- Since:
- 1.0
- Author:
- Gregory Kotsaftis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Centers a window on screen.static void
Hides a specific column of a JTable.static void
invokeAndWait
(Runnable task) Execute a task on EDT and block's it, until the task is finished.static void
lockJTableColumnWidth
(TableColumn tc, int pixels) Locks a Jtable's column width with 'pixels' size.static void
Maximizes a JFrame, just like the 'maximize window' button does.
-
Constructor Details
-
GUIUtils
public GUIUtils()
-
-
Method Details
-
invokeAndWait
Execute a task on EDT and block's it, until the task is finished. If there is an exception, it is converted to a RuntimeException.- Parameters:
task
- The process to run.
-
centerOnScreen
Centers a window on screen.- Parameters:
w
- The window to center.
-
maximizeJFrame
Maximizes a JFrame, just like the 'maximize window' button does.- Parameters:
f
- The frame to maximize.
-
lockJTableColumnWidth
Locks a Jtable's column width with 'pixels' size.- Parameters:
tc
- The table column.pixels
- The desired pixels.
-
hideJTableColumn
Hides a specific column of a JTable.- Parameters:
tc
- The table column.
-