🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11045

JComboBox & JTable

#11045
From: Redding Bacon
Date: Wed, 21 Jul 1999 00:00
29 lines
2076 bytes
Hey JBuilder,

I'm using JB3 and  Java2 to develop applets.  This is a 2 part question

1.  JComboBox.  We have an applet that display records one at a time.  One
of the UI components in that applet is a JComboBox.  When this applet is not
in "Edit Mode" and is displaying a record, the JComboBox only has one Item
in the drop down list.  When the applet navigates to the next record it must
remove what was in the JComboBox and then add its own item ( ie.,
JComboBox.addItem( new item);).   The problem is that I can't figure out how
to remove the old Item from the JCombo before entering the new one.  Anybody
know how I should do this?

2. JTable.  We have an applet much like the one in the previous question, it
displays records. It contains a JTabbedPane with 2 tabs, one containing a
JTable and the other containing swing text components (ie, JTextField....).
Users may view a list of records in the JTable, select one and then click on
the other tab to view detailed information of that record in the text
components.   The problem is that if a user clicks on the Jtable or uses
their keyboard to navigate through the list of records, the components on
the other tab don't know what the currently selected record is and may show
one that is different from the one selected in the JTable.   I tried to use
mouse and key events.  But they failed to work on a consistant basis.
Are there any JTable "selectionChanged" event listeners or methods that will
allow me to catch a selection change event?  Anybody know how I should
handle this one?

Thanks for your help once again!
Redding
Technical Details
Message-ID: <7n4s51$kc64@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,dddc12039551ba10,start
X-Google-Attributes: gid111d45,public
From: "Redding Bacon" <reddingbacon@msn.com>
Subject: JComboBox & JTable
Date: 1999/07/21
Message-ID: <7n4s51$kc64@forums.borland.com>
X-Deja-AN: 503588672
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: RMS
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.swing