🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Can't fit a JTable with a Scrollbar

#9062
From: Steve Horsley
Date: Thu, 08 Jun 2000 00:00
25 lines
1306 bytes
I'm having trouble understanding exactly what you're doing, but here's
my tuppence worth:

Originally, you added the JTable to the JFrame, and set the size of
the JTable.

Instead, do something like:
    JScrollPanel myScrollPanel = new JScrollPanel(myJTable);
Then instead of adding the JTable ro the frame, add the scroll panel.

Hope this helps.
Steve.

Ralf Berger wrote:
> 
> I have a JTable in a JFrame together with other dialog components.
> Layout is null.  I have created a scroll pane and added the table to it.
> I am not able to display a scrollbar.
> 
> If I use GridLayout and the JTable covers the whole frame, then
> it is no problem to get a scrollbar.
> 
> Can anyone help me ?
> 
> RalfB
Technical Details
Message-ID: <393FCD3C.AA2D251C@cwcom.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8ho672$r0f4@bornews.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,226aeafa7a8c247d
X-Google-Attributes: gid111d45,public
From: Steve Horsley <steve.horsley@cwcom.co.uk>
Subject: Re: Can't fit  a  JTable with a Scrollbar
Date: 2000/06/08
Message-ID: <393FCD3C.AA2D251C@cwcom.co.uk>
X-Deja-AN: 632678717
Content-Transfer-Encoding: 7bit
References: <8ho672$r0f4@bornews.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Trace: 8 Jun 2000 09:34:36 -0800, 194.200.13.1
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing