Link to home
Start Free TrialLog in
Avatar of pkrush
pkrush

asked on

Adding elements in AWT choice (Combo) boxes in Netbeans

What is the best way to add elements in AWT choice boxes in Netbeans IDE 3.6?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pkrush
pkrush

ASKER

With the GIU designer?

Is using the GIU designer worth it?

Thanks again
Ahhh....

for adding the items into the list, I'd do that in code...  Not sure you can do it in the designer (I know you can't in JBuilder)

Use the designer for putting things where you want them, then the code for filling them up :-)

Tim
- Select the combo box
- in the properties press the button besides the item "Model"
- the rest should be clear :)
Can java.awt.Choice elements have a model?
>> in the properties
I mean

In the properties window press the browse ("...") button that is located besides the item "model" (within the "Properties" node)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
/me points to his previous answer ;-)
Remark:

addItem is obsolete as of Java 2 platform v1.1. Please use the add() method instead.
:°P  
hehehe ;°)
Avatar of pkrush

ASKER

Thank you both very much.
Avatar of pkrush

ASKER

If one was bent on using the GUI form designer (like me) they could just place the add statements to the post-init code as well. I just thought there would be a better way.
Thanks