🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7288

JTable Problems

#7288
From: Sara Swartz
Date: Sat, 30 Jun 2001 12:38
37 lines
2178 bytes
I have a program that allows the user to choose a drive, then choose a
directory, and then shows the subdirectories with a count of the files in
the subdirectories, so the results look like this:

C:\MyDirectory       4
C:\MyDirectory\MySubDirectory1   6
C:\MyDirectory\MySubDirectory2   18
C:\MyDirectory\MySubDirectory3   12
C:\MyDirectory\MySubDirectory\MySubSubDirectory1   12
C:\MyDirectory\MySubDirectory\MySubSubDirectory2   27

I would like to change this listing to a table so that the format looks more
aligned. More like this:

C:\MyDirectory
4
C:\MyDirectory\MySubDirectory1                                   6
C:\MyDirectory\MySubDirectory2                                   18
C:\MyDirectory\MySubDirectory3                                   12
C:\MyDirectory\MySubDirectory\MySubSubDirectory1   12
C:\MyDirectory\MySubDirectory\MySubSubDirectory2   27

However, I have been having a hard time getting the JTable to work when the
data is populated at run time. How and where do I instantiate the JTable
component, using JBuilder? When I use the following in the Button_event,
with object table MyTable, it does not populate the table:

Some Button action..
Populate Object [][] a  and Object[] b;
MyTable = new JTable(a,b);

The populated table does not show up.

Can you give me any help on this?

Thanks,
Sara
Technical Details
Message-ID: <3b3e006b$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e08081827403bdce,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-30 09:40:01 PST
From: "Sara Swartz" <Sarabill@nospamHotmail.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: JTable Problems
Date: Sat, 30 Jun 2001 12:38:44 -0000
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2462.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.0000
NNTP-Posting-Host: 24.52.33.77
Message-ID: <3b3e006b$1_2@dnews>
X-Trace: dnews 993919083 24.52.33.77 (30 Jun 2001 09:38:03 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews