By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,484 Members | 1,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,484 IT Pros & Developers. It's quick & easy.

Help JCombobox

jeffbroodwar
100+
P: 118
Hi,

I tried to use JCombobox (i'm using netbeans 5.5)

how can i use this jComboBox1? how can i load elements? I tried this code but i'm receiving errors....

jComboBox1.setModel("Bird","Dog","Cat","Fish");

Regards,
Jeff
Jul 2 '07 #1
Share this Question
Share on Google+
2 Replies


10K+
P: 13,264
Hi,

I tried to use JCombobox (i'm using netbeans 5.5)

how can i use this jComboBox1? how can i load elements? I tried this code but i'm receiving errors....

jComboBox1.setModel("Bird","Dog","Cat","Fish");

Regards,
Jeff
The sun tutorial has dedicated a whole section on how to use the combobox.
Jul 2 '07 #2

jeffbroodwar
100+
P: 118
Thanx i got it now..... just use the .addItem method....

jComboBox1.addItem("ISDA");

adds isda in the combo box
Jul 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.