Article View: borland.public.jbuilder.java.swing
Article #8544JBuilder & JTable
From: Karl Thompson
Date: Tue, 15 Aug 2000 00:00
Date: Tue, 15 Aug 2000 00:00
30 lines
1612 bytes
1612 bytes
I can get a JTable to display data, but what I don't understand is how a
JTable and by extension a TableModel is suppose to be used inside of
JBuilder.
If I drop a JTable on a JScrollPanel inside the IDE, select the JTable,
right click on model and select expose as Class level variable a variable is
created as expected. However, JBuilder does not let me select this variable
in the combobox property editor. The property editor continues to show no
value. Not even <none>.
Is this the way it suppose to work? If so, what's the point?
Secondly, in any event, I go and make the following edits to the source. Am
I on the right track?:
// TableModel tableModel1; /* exposed class level variable....
TableModel ourTableModel; /* class OurTableModel extends
AbstractTableModel {
/* Component initialization
private void jbInit() throws Exception {
{..}
/* JBuilder gets up to this point, I added this:
ourTableModel = new OurTableModel();
jTable1 = new JTable( ourTableModel );
ourTableModel = jTable1.getModel();
jScrollPane1 = new JScrollPane( jTable1 );
contentPane.add(jScrollPane1, BorderLayout.CENTER);
{..}
Technical Details
Message-ID:
<39994bb7_2@dnews>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,a4b8a340b1728c23,start X-Google-Attributes: gid111d45,public From: "Karl Thompson" <karlt@pine-grove.com> Subject: JBuilder & JTable Date: 2000/08/15 Message-ID: <39994bb7_2@dnews> X-Deja-AN: 658529441 X-Trace: 15 Aug 2000 06:55:03 -0800, 207.98.169.130 Newsgroups: borland.public.jbuilder.java.swing X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300