Open main menu

CDOT Wiki β

Changes

no edit summary
4.b.3. Change the instantiation of menu items to use the new class created ''ImageMenuItem'', pass the name of the menu item to the constructor:<br/>
<source lang="java">
// MenuItem addItem = new MenuItem(new StringProvider("Add Student"), 200, 2); // without image ImageMenuItem addItem = new ImageMenuItem("Add Student", 100, 1, MENU_ADD); addItem.setCommand(new Command(new CommandHandler() {
</source>
[[Image: BB_MenuImage.png | 300px]]<br/>
1
edit