public class Popup extends Object
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
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
|Modifier||Constructor and Description|
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
Popup. This is provided for subclasses.
public void show()
Popupvisible. If the
Popupis currently visible, this has no effect.
public void hide()
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.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.