Skip to content

Instantly share code, notes, and snippets.

@Faylixe
Last active December 7, 2015 11:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Faylixe/9f70951e3501b3d4d960 to your computer and use it in GitHub Desktop.
Save Faylixe/9f70951e3501b3d4d960 to your computer and use it in GitHub Desktop.
Sample for menu builder.
/** Creates File menu and plug it to the target menu bar. **/
private void createFileMenu() {
final MenuBuilder builder = new MenuBuilder(new JMenu("File"));
builder.createItem("Open", controller::open);
builder.createItem("Save", controller::save);
builder.createItem("Exit", controller::exit);
target.add(builder.get());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment