public class Popup extends Object
Component to the user, typically
on top of all the other
Components in a particular containment
Popups have a very small life cycle. Once you
have obtained a
Popup, and hidden it (invoked the
hide method), you should no longer
invoke any methods on it. This allows the
PopupFactory to cache
Popups for later use.
The general contract is that if you need to change the size of the
Component, or location of the
Popup, you should
obtain a new
Popup does not descend from
Popup are responsible for creating
and maintaining their own
Components to render the
Component to the user.
You typically do not explicitly create an instance of
instead obtain one from a
- See Also:
Popupfor the Component
ownercontaining the Component
owneris used to determine which
Popupwill parent the
Popupcreates to. A null
ownerimplies there is no valid parent.
yspecify the preferred initial location to place the
Popupat. Based on screen size, or other paramaters, the
Popupmay not display at
owner- Component mouse coordinates are relative to, may be null
contents- Contents of the Popup
x- Initial x screen coordinate
y- Initial y screen coordinate
IllegalArgumentException- if contents is null
protected Popup()Creates a
Popup. This is provided for subclasses.
public void show()Makes the
Popupvisible. If the
Popupis currently visible, this has no effect.
public void hide()Hides and disposes of the
Popup. Once a
Popuphas been disposed you should no longer invoke methods on it. A
Popupmay be reclaimed and later used based on the
PopupFactory. As such, if you invoke methods on a
Popup, indeterminate behavior will result.