Documentation

(jvx:client:gui)

Dropdown Menu Button

A dropdown menu button is a button which shows a dropdown menu on click. The button will look like one of these:

Browser Desktop

To create such button, simply use the following snippet:

UIPopupMenuButton button = new UIPopupMenuButton();
button.setImage(UIImage.getImage(IFontAwesome.BARS_SMALL));
 
UIMenuItem miDelete = new UIMenuItem("Delete", UIImage.getImage(UIImage.REMOVE_SMALL), this, "doDelete");
UIMenuItem miExport = new UIMenuItem("Export", UIImage.getImage(UIImage.EXPORT_SMALL), this, "doExport");
 
UIPopupMenu popupMenu = new UIPopupMenu();
popupMenu.add(miDelete);
popupMenu.add(miExport);
 
button.setPopupMenu(popupMenu);
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information