Hi,I had created a Combobox called cboStart at the GUI form...Now I would like to add the integer of 1 to 12 into the combobox,may I know how can I do it?
daniel50096230 0
Newbie Poster
Recommended Answers
Jump to PostHi,I had created a Combobox called cboStart at the GUI form...Now I would like to add the integer of 1 to 12 into the combobox,may I know how can I do it?
cboStart.addItem(new Integer(1)); cboStart.addItem(new Integer(2)); // and so one to 12 cboStart.addItem(1); cboStart.addItem(2); // and so …
Jump to PostcboStart.addItem(new Integer(1));
boStart.addItem(new Integer(2)); // and so one to 12
cboStart.addItem(1);
cboStart.addItem(2); // and so one to 12Use any of these two methods.
Regards,
PuneetKThe: cboStart.addItem(new Integer(1)) will add Integer objects to the ComboBox and you will have to cast them to Integer when you get …
All 7 Replies
puneetkay 40
Junior Poster
javaAddict 900
Nearly a Senior Poster Team Colleague Featured Poster
daniel50096230 0
Newbie Poster
peter_budo 2,532
Code tags enforcer Team Colleague Featured Poster
puneetkay 40
Junior Poster
Ezzaral 2,714
Posting Sage Team Colleague Featured Poster
javaAddict 900
Nearly a Senior Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.