addItem(JMenuItem) method added

cusax-fix
Yana Stamcheva 20 years ago
parent ee9841500e
commit 30fffec85b

@ -85,6 +85,14 @@ public void addItem(String text, Icon icon,
this.popup.add(item);
}
/**
* Adds an item to the "choice list" of this selector box.
* @param menuItem The menu item to add.
*/
public void addItem(JMenuItem menuItem) {
this.popup.add(menuItem);
}
/**
* Calculates the "choice list" popup location depending on the
* main label coordinates.
@ -191,7 +199,7 @@ public Object getSelectedObject() {
* Returns the popup menu for this selector box.
* @return the popup menu for this selector box.
*/
public JPopupMenu getPopup() {
public JPopupMenu getPopup() {
return popup;
}
}

Loading…
Cancel
Save