Class WindowUtilities

java.lang.Object
se.datadosen.util.WindowUtilities

public class WindowUtilities
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    WindowUtilities()  
  • Method Summary

    Modifier and Type Method Description
    static boolean loadBounds​(java.awt.Window win)
    Load window bounds from preferences to specified window
    static void saveBounds​(java.awt.Window win)
    Save bounds from specified window to preferences
    static void setDefaultFocus​(java.awt.Component c)
    Ensure that the passed component gets focused whenever its containing window is shown Handy to use in order to set default focus to 1:st component of a JOptionPane dialog See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5018574

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • setDefaultFocus

      public static void setDefaultFocus​(java.awt.Component c)
      Ensure that the passed component gets focused whenever its containing window is shown Handy to use in order to set default focus to 1:st component of a JOptionPane dialog See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5018574
      Parameters:
      c - Component to receive focus when containing window shows
      Since:
      10.5
    • loadBounds

      public static boolean loadBounds​(java.awt.Window win)
      Load window bounds from preferences to specified window
      Parameters:
      win -
      Returns:
      true if bounds were found and set
      Since:
      22
    • saveBounds

      public static void saveBounds​(java.awt.Window win)
      Save bounds from specified window to preferences
      Parameters:
      win -
      Since:
      22