Package gr.zeus.util

Class GUIUtils

java.lang.Object
gr.zeus.util.GUIUtils

public final class GUIUtils extends Object
GUI Helper class, contains static methods that are used all the time.

Since:
1.0
Author:
Gregory Kotsaftis
  • Constructor Details

    • GUIUtils

      public GUIUtils()
  • Method Details

    • invokeAndWait

      public static void invokeAndWait(Runnable task)
      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

      public static void centerOnScreen(Window w)
      Centers a window on screen.

      Parameters:
      w - The window to center.
    • maximizeJFrame

      public static void maximizeJFrame(JFrame f)
      Maximizes a JFrame, just like the 'maximize window' button does.

      Parameters:
      f - The frame to maximize.
    • lockJTableColumnWidth

      public static void lockJTableColumnWidth(TableColumn tc, int pixels)
      Locks a Jtable's column width with 'pixels' size.

      Parameters:
      tc - The table column.
      pixels - The desired pixels.
    • hideJTableColumn

      public static void hideJTableColumn(TableColumn tc)
      Hides a specific column of a JTable.

      Parameters:
      tc - The table column.