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 voidCenters a window on screen.static voidHides a specific column of a JTable.static voidinvokeAndWait(Runnable task) Execute a task on EDT and block's it, until the task is finished.static voidlockJTableColumnWidth(TableColumn tc, int pixels) Locks a Jtable's column width with 'pixels' size.static voidMaximizes 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.
-