Categories: Java | Java ME | How To | Code Examples | UI
This page was last modified 08:27, 25 September 2007.
How to create a quick Options Menu in Java ME
From Forum Nokia Wiki
It is a "must" feature in a Game or Multimedia applications that the application includes an "Options" menu with some features that the user can enable or disable, like Sound or Vibration.
So, we can use LCUI API in MIDP 1.0 and MIDP 2.0 to show a List Multiple. That list can be shown in the Display and the user can enable or disable each option of the List.
private List menu; (...) menu = new List("Game Options", List.MULTIPLE); menu.append("Music", null); menu.append("Sound", null); menu.append("Map", null); menu.append("OnScreen Help", null); // We predefine the checked status of each option boolean[] options = {false, true, false, true}; menu.setSelectedFlags(options); ok = new Command("Save", Command.OK, 1); menu.addCommand(ok); menu.setCommandListener(this);
On the commandAction method we should check the menu.getSelectedFlags to fill a boolean array with the status of each option.
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to create a main menu with a picture on top? | pengox | Mobile Java General | 0 | 2004-11-26 20:11 |
| How to get OK instead of Options above the left soft key when displaying a TextBox? | timo_focus | Mobile Java General | 2 | 2005-09-03 18:24 |
| How to include options menu in multiselect CAknListQueryDialog | anand_zain76 | Symbian User Interface | 7 | 2006-08-24 23:54 |
| Adding Menu pane to the form | Saritha Reddy | Symbian User Interface | 13 | 2008-03-17 13:07 |
| 6600 item commands & options menu | random_john_doe | Mobile Java General | 0 | 2003-12-10 16:18 |
