Class GuiUtils


  • public class GuiUtils
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void centerDialog​(javax.swing.JDialog dialog, javax.swing.JFrame frame)
      Centers a dialog in a frame
      static void centerFrame​(javax.swing.JFrame frame)
      Centers a frame on the screen
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • centerFrame

        public static void centerFrame​(javax.swing.JFrame frame)
                                throws java.lang.IllegalArgumentException
        Centers a frame on the screen
        Parameters:
        frame - the frame to center
        Throws:
        java.lang.IllegalArgumentException - if frame is null
      • centerDialog

        public static void centerDialog​(javax.swing.JDialog dialog,
                                        javax.swing.JFrame frame)
                                 throws java.lang.IllegalArgumentException
        Centers a dialog in a frame
        Parameters:
        dialog - the dialog to center
        frame - the frame
        Throws:
        java.lang.IllegalArgumentException - if either dialog or frame are null