Advanced
Java
Services
|
MenuBar |
Konstruktoren | |
MenuBar() | Creates a new menu bar. |
Methoden | |
Returntyp | Name der Methode |
Menu | add(Menu m) Adds the specified menu to the menu bar. |
void | remove(int index) Removes the menu located at the specified index from this menu bar. |
void | remove(MenuComponent m) Removes the specified menu component from this menu bar. |
// Frame mit einer MenuBar ausstatten MenuBar mb = new MenuBar(); Frame f = new Frame(); f.setMenuBar(mb); // Menu anlegen und aufnehmen Menu dateiMenu = new Menu("Datei"); mb.add(dateiMenu);