public class Popup extends ObjectPopups are used to display a
Componentto the user, typically on top of all the other
Components in a particular containment hierarchy.
Popups have a very small life cycle. Once you have obtained a
Popup, and hidden it (invoked the
hidemethod), you should no longer invoke any methods on it. This allows the
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
Popupdoes not descend from
Component, rather implementations of
Popupare responsible for creating and maintaining their own
Components to render the requested
Componentto the user.
You typically do not explicitly create an instance of
Popup, 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.