Article View: borland.public.jbuilder.java.swing
Article #12146Re: Use pick lists?
From: Steven Scheffler
Date: Wed, 17 Feb 1999 00:00
Date: Wed, 17 Feb 1999 00:00
43 lines
2093 bytes
2093 bytes
That's exactly what picklists are for. Unfortunately there appear to be a few bugs with the latest JdbComboBox from borland (I was able to find a few mistakes digging through the source). I've had luck with the JdbNavComboBox and picklists but wasn't able to get JdbComboBox to work. I resorted to throwing together a data aware JComboBox class to meet my picklist needs. If the JdbNavComboBox doesn't work out for you I'd be happy to share the code I've got with you. </steve> http://www.claritycomputing.com Brian Hughes wrote in message <36CB3F8D.3F4A8948@nact.com>... >Hi - > >I need to populate a JdbComboBox with a list of choices from column in >my database. I want these choices to be strings, and I want the number >that is stored in the field corresponding to the selection to be an >integer that corresponds to the choice. For example, with the following >"City Table": > >Name column Number column >New York 1 >Washington 2 >Tokyo 3 >Paris 4 > >I want the four strings to show up in a ComboBox, and when I select one >of the values, I want the corresponding number to be stored in the field >that is tied to the ComboBox. Is this what a pick list is for? I've >tried to get a pick list to do this, and I guess that I must be doing >something wrong. Can anyone explain what I need to do or point me to a >resource that will help me accomplish this? Thanks for your help. > >-- >J. Brian Hughes > >Software Engineer >R&D Switch Group >NACT Telecommunications, Inc. > >
Technical Details
Message-ID:
<7afuoa$bgi9@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<36CB3F8D.3F4A8948@nact.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,4430c7c72693a059 X-Google-Attributes: gid111d45,public From: "Steven Scheffler" <steve@claritycomputing.com> Subject: Re: Use pick lists? Date: 1999/02/17 Message-ID: <7afuoa$bgi9@forums.borland.com> X-Deja-AN: 445555377 References: <36CB3F8D.3F4A8948@nact.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing