• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dropdown boxes

 
ada choi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i code dropdown boxes in MIDP devices using J2ME??
Please reply.. its really urgent!!
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the POPUP style ChoiceGroup in MIDP 2
 
ada choi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do u have any examples? because i cant understand the codings..
thank you.
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to read the Javadoc for the ChoiceGroup class in MIDP 2 documentation. It is adequately discussed there.
 
ada choi
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
POPUP

public static final int POPUP

POPUP is a choice having exactly one element selected at a time. The selected element is always shown. The other elements should be hidden until the user performs a particular action to show them. When the user performs this action, all elements become accessible. For example, an implementation could use a popup menu to display the elements of a ChoiceGroup of type POPUP.

The POPUP type is not valid for List objects.

Value 4 is assigned to POPUP.

Since: MIDP 2.0

Im sorry, but i really can't understand what it is trying to say. Do i just code (public static final int POPUP) and the POPUP list will be shown?
what does it means that it is not valid for List objects?
Thanks again for helping out.
 
Michael Yuan
author
Ranch Hand
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really need to read a basic MIDP tutorial/book on how to setup a ChoiceGroup UI widget with a specific "type". For example, this one

http://www.developer.com/java/j2me/print.php/10934_1561591_2

Of the two classes implementing the Choice interface, ChoiceGroup can be instantiated with the POPUP type but List cannot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic