PopupWindow class
You can add another JPopupMenu or JComboxBox in this popup.
This class is copied from http://forum.java.sun.com/thread.jsp?forum=57&thread=230866
with some minor modifications.
addAsExcludedComponents(Component comp) PopupWindow will add necessary listeners to some components
so that mouse click etc can hide the popup window.
public void
addPopupMenuListener(PopupMenuListener l) Adds a PopupMenu listener which will listen to notification
messages from the popup portion of the combo box.
public void
firePopupMenuCanceled() Notifies PopupMenuListeners that the popup portion of the
combo box has been canceled.
PopupWindow will add necessary listeners to some components
so that mouse click etc can hide the popup window. However in
certain case, you might not want this.
Parameters: comp - component which will not hide popup when it is clicked.
Adds a PopupMenu listener which will listen to notification
messages from the popup portion of the combo box.
For all standard look and feels shipped with Java 2, the popup list
portion of combo box is implemented as a JPopupMenu.
A custom look and feel may not implement it this way and will
therefore not receive the notification.
Parameters: l - the PopupMenuListener to add since: 1.4
Notifies PopupMenuListeners that the popup portion of the
combo box has been canceled.
This method is public but should not be called by anything other than
the UI delegate.
See Also:PopupWindow.addPopupMenuListener since: 1.4
firePopupMenuWillBecomeInvisible
public void firePopupMenuWillBecomeInvisible()(Code)
Notifies PopupMenuListeners that the popup portion of the
combo box has become invisible.
This method is public but should not be called by anything other than
the UI delegate.
See Also:PopupWindow.addPopupMenuListener since: 1.4
firePopupMenuWillBecomeVisible
public void firePopupMenuWillBecomeVisible()(Code)
Notifies PopupMenuListeners that the popup portion of the
combo box will become visible.
This method is public but should not be called by anything other than
the UI delegate.
See Also:PopupWindow.addPopupMenuListener since: 1.4
Returns an array of all the PopupMenuListeners added
to this JComboBox with addPopupMenuListener().
all of the PopupMenuListeners added or an emptyarray if no listeners have been added since: 1.4