ar.com.leak.iolsucker.container.swing
Class UiUtil

java.lang.Object
  extended by ar.com.leak.iolsucker.container.swing.UiUtil

public final class UiUtil
extends Object

Static convenience methods for GUIs which eliminate code duplication.

Author:
javapractices.com

Method Summary
static void centerAndShow(Window aWindow)
           
static void centerOnParentAndShow(Window aWindow)
          A window is packed, centered with respect to a parent, and then shown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

centerAndShow

public static void centerAndShow(Window aWindow)
Parameters:
aWindow - window to center in the screen, and to show

centerOnParentAndShow

public static void centerOnParentAndShow(Window aWindow)
A window is packed, centered with respect to a parent, and then shown.

This method is intended for dialogs only.

If centering with respect to a parent causes any part of the dialog to be off screen, then the centering is overidden, such that all of the dialog will always appear fully on screen, but it will still appear near the parent.

Parameters:
aWindow - must have non-null result for aWindow.getParent.


Copyright © 2005-2009 leak.com.ar. All Rights Reserved.