Article View: borland.public.jbuilder.java.swing
Article #1419Jcombobox and numbers
From: tz
Date: Sun, 09 Nov 2003 14:51
Date: Sun, 09 Nov 2003 14:51
13 lines
1244 bytes
1244 bytes
Please someone give me some sample code to add numbers in jcombobox. This is
my code:
void cmbCalendar_actionPerformed(ActionEvent e) {
String s = (String) cmbYear.getSelectedItem();
if (s.equals("Gregorian"))
{
for (int x = 1583; x < 2501; x++)
{
cmbYear.addItem((String) (x));
...............
The above line is erroring out. Can someone tell me how to correct this with
a code sample?
thanks.
Technical Details
Message-ID:
<3fae5464$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,a319fdba4750032b,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-11-09 07:01:26 PST From: "tz" <teddybubu@hotmail.com> Newsgroups: borland.public.jbuilder.java.swing Subject: Jcombobox and numbers Date: Sun, 9 Nov 2003 08:51:18 -0600 Lines: 15 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 65.29.24.114 Message-ID: <3fae5464$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1068389476 65.29.24.114 (9 Nov 2003 06:51:16 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!newsgroups.borland.com!not-for-mail