How to use Popup choice group
Article Metadata
The following code creates a Form with a Popup Choice Group.
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Choice_Group extends MIDlet
{
Display display=Display.getDisplay(this);
public void startApp()
{
Form form = new Form("Form example");
//ChoiceGroup(label,type,elements,image)
ChoiceGroup CoursePOP = new ChoiceGroup ("Pop Up choice", Choice.POPUP,
new String[] {"Python", "J2ME","Symbian"}, null);
form.append(CoursePOP);
display.setCurrent(form);
}
}
The following screen shot is an outcome.



26 Sep
2009
This is a very useful code example showing how we can show pop up choice Group instead of common menu items. Its very easy to understand code. it becomes very handy when we want to display group of choices after selection of menu item. We are limited to screen size, so that we can display only limited menu items.so pop up choice group help developers a lot for giving multiple menu items in the form of Choice Group.
I have tried this code. Work very efficiently and easy to implement.