Article View: borland.public.jbuilder.java.swing
Article #12144Use pick lists?
From: Brian Hughes
Date: Wed, 17 Feb 1999 00:00
Date: Wed, 17 Feb 1999 00:00
27 lines
1462 bytes
1462 bytes
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:
<36CB3F8D.3F4A8948@nact.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,4430c7c72693a059,start X-Google-Attributes: gid111d45,public From: Brian Hughes <bhughes@nact.com> Subject: Use pick lists? Date: 1999/02/17 Message-ID: <36CB3F8D.3F4A8948@nact.com> X-Deja-AN: 445526708 Content-Transfer-Encoding: 7bit X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: NACT Telcommunications, Inc. Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing