List of usage examples for javax.swing JPopupMenu removeFocusListener
public synchronized void removeFocusListener(FocusListener l)
From source file:com.anrisoftware.prefdialog.miscswing.components.menu.PopupMenuComponent.java
/** * Sets the pop-up menu./*from w ww.j a v a2 s .c o m*/ * * @param menu * the {@link JPopupMenu}. * * @throws NullPointerException * if the specified menu is {@code null}. */ public void setPopupMenu(JPopupMenu menu) { notNull(component); JPopupMenu oldValue = this.menu; this.menu = menu; if (oldValue != null) { oldValue.removeFocusListener(menuFocusListener); } menu.addFocusListener(menuFocusListener); }