Class GuiUtil


  • public class GuiUtil
    extends Object
    Useful GUI utilities
    Version:
    1.7
    • Constructor Detail

      • GuiUtil

        public GuiUtil()
    • Method Detail

      • center

        public static void center​(Component componentToMove,
                                  Component componentToCenterOn)
        Centers the first component on the second
      • centerOnScreen

        public static void centerOnScreen​(Component componentToMove)
        Centers the component on the screen
      • centerOnWindow

        public static void centerOnWindow​(Component componentToMove)
        Centers the component on its window
      • commitChanges

        public static void commitChanges​(JTable table)
      • getSelectedFiles

        public static File[] getSelectedFiles​(JFileChooser chooser)
        Workaround for Swing bug: JFileChooser does not support multi-file selection See Sun bug database 4218431. http://manning.spindoczine.com/sbe/files/uts2/Chapter14html/Chapter14.htm)
      • formatTooltips

        public static void formatTooltips​(Container container)
        Changes the tooltip text of each component in the Container to be multiline HTML. Modifies all descendants (children, grandchildren, etc.).
      • formatTooltip

        public static void formatTooltip​(JComponent jcomponent)
        Changes the tooltip text of the JComponent to be multiline HTML.