wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes Choice choice = new Choice(); Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Choice choice = new Choice();" Watch "Choice choice = new Choice();" New topic
Author

Choice choice = new Choice();

Martin vanPutten
Ranch Hand

Joined: Mar 26, 2006
Posts: 124
As you can probably see... i'm having a problem with Choice. I have an arraylist already set up basically of items in a specific room and different items in another item. How can I put that into a choice.add(itemArrayList);? I thought I had my code right but apparently it couldn't be read. Does anybody know of a tutorial I can refer to for adding ArrayLists to a Choice?


Live And Let Learn.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

What is a Choice? What API?


GenRocket - A Test Data Generation Platform
Martin vanPutten
Ranch Hand

Joined: Mar 26, 2006
Posts: 124
Choice gives you a drop down menu.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
What is a Choice?
An AWT component, antecedant to the JComboBox.
Does anybody know of a tutorial I can refer to for adding ArrayLists to a Choice?
Your best bet is to check the api. It has an add method that takes a String argument. Without generics, you might populate your Choice like this:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Choice choice = new Choice();
 
Similar Threads
XMLHttpRequest problem
how can I provide edit access to CHOICE Box component
Loops
form with submit option
ChoiceGroup/List +MultipleSelection+Selectin g only true Values