javax.swing

Class Popup

public class Popup extends Object

Manages a popup window that displays a Component on top of everything else.

To obtain an instance of Popup, use the {@link javax.swing.PopupFactory}.

Since: 1.4

Constructor Summary
protected Popup(Component owner, Component contents, int x, int y)
Constructs a new Popup given its owner, contents and the screen position where the popup will appear.
protected Popup()
Constructs a new Popup.
Method Summary
voidhide()
Removes the Popup from the screen.
voidshow()
Displays the Popup on the screen.

Constructor Detail

Popup

protected Popup(Component owner, Component contents, int x, int y)
Constructs a new Popup given its owner, contents and the screen position where the popup will appear.

Parameters: owner the Component to which x and y are relative, or null for placing the popup relative to the origin of the screen. contents the contents that will be displayed inside the Popup. x the horizontal position where the Popup will appear. y the vertical position where the Popup will appear.

Throws: IllegalArgumentException if contents is null.

Popup

protected Popup()
Constructs a new Popup.

Method Detail

hide

public void hide()
Removes the Popup from the screen. Nothing happens if it is currently hidden.

show

public void show()
Displays the Popup on the screen. Nothing happens if it is currently shown.