Article View: borland.public.jbuilder.java.swing
Article #1420Re: Jcombobox and numbers
From: tz
Date: Sun, 09 Nov 2003 15:06
Date: Sun, 09 Nov 2003 15:06
22 lines
1615 bytes
1615 bytes
String s = (String) cmbYear.getSelectedItem(); is really String s =
(String) cmbCalendar.getSelectedItem();
"tz" <teddybubu@hotmail.com> wrote in message
news:3fae5464$1@newsgroups.borland.com...
> 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:
<3fae5802$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fae5464$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,a319fdba4750032b X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-11-09 07:09:07 PST From: "tz" <teddybubu@hotmail.com> Newsgroups: borland.public.jbuilder.java.swing References: <3fae5464$1@newsgroups.borland.com> Subject: Re: Jcombobox and numbers Date: Sun, 9 Nov 2003 09:06:42 -0600 Lines: 24 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: <3fae5802$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1068390402 65.29.24.114 (9 Nov 2003 07:06:42 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail