audiojury.gui.common
Class WindowUtil

java.lang.Object
  |
  +--audiojury.gui.common.WindowUtil

public class WindowUtil
extends java.lang.Object

Contains several useful windows management functions.


Method Summary
static void centerWindowOnScreen(java.awt.Window win)
          Centers the window on the screen.
static void centerWindowOnWindow(java.awt.Window win, java.awt.Window relative)
          Centers the window on another parent window.
static void maximizeWindow(java.awt.Window win)
          Maximizes the window on the screen.
static void showError(java.awt.Component parent, java.lang.String message)
          Shows an error dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

showError

public static void showError(java.awt.Component parent,
                             java.lang.String message)
Shows an error dialog.

Parameters:
parent - parent component
message - message text to display

maximizeWindow

public static void maximizeWindow(java.awt.Window win)
Maximizes the window on the screen.

Parameters:
win - window object to maximize

centerWindowOnScreen

public static void centerWindowOnScreen(java.awt.Window win)
Centers the window on the screen.

Parameters:
win - window object to center

centerWindowOnWindow

public static void centerWindowOnWindow(java.awt.Window win,
                                        java.awt.Window relative)
Centers the window on another parent window.

Parameters:
win - window object to center
relative - parent window