🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java.gui
Article #57

Re: JTable & JScrollPane

#57
From: Raf Lenaerts
Date: Thu, 09 Sep 1999 00:00
24 lines
1832 bytes
> > I have written a MyTable (extending JTable) with MyTableModel and
> > MyTreeCellRenderer. The data that gets displayed is correct, but I am
> > having troubles with the displaying of the data. All columns have a
> > fixed width (I don't know why) and don't adjust to the width of my
> > table. Either their is some space after the last column, or the last
> > column does not get displayed.
> > If I put the MyTable in a JScrollPane then there are never any
> > scrollbars.
>
> Check for the scrollBarPolicies of the ScrollPane.
> Set them to as_needed or as_always.
> Then check the weight and autoscrolls settings for the cells.
> Check the insets and internal padding settings for the cells also.
> And set fixedWidth to false it there is such property.
>
The scrollbars were set as_needed.
And I don't see how I have access to the cells. I only have a TableModel for
MyTable. Do you mean yhay I should use a TableCellRenderer?

I should say that if I change the width of one column, then all other
collumns change their width and the table is displayed correctly. But I want
it displayed correctly from the first moment.

Raf
Technical Details
Message-ID: <7r7lng$dfj$1@news3.Belgium.EU.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7r5lih$9n7$1@news3.Belgium.EU.net> <7r5q79$f99$1@nnrp1.deja.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,27c1ee62fab07e84
X-Google-Attributes: gid111d45,public
X-Google-Thread: 10fd6d,27c1ee62fab07e84
X-Google-Attributes: gid10fd6d,public
From: "Raf Lenaerts" <raf.lenaerts@student.luc.ac.be>
Subject: Re: JTable & JScrollPane
Date: 1999/09/09
Message-ID: <7r7lng$dfj$1@news3.Belgium.EU.net>
X-Deja-AN: 522847184
References: <7r5lih$9n7$1@news3.Belgium.EU.net> <7r5q79$f99$1@nnrp1.deja.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: EUnet Belgium, Leuven, Belgium
X-MSMail-Priority: Normal
Newsgroups: comp.lang.java.gui,borland.public.jbuilder.java.swing