🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: JSplitPane does not remember the divider

#9573
From: Nils-Erik Thorell
Date: Tue, 29 Feb 2000 00:00
41 lines
2183 bytes
Yes, I understand. But we have big problems with JScollPanes inside a
JSplitPane, and then
JTrees inside the JScrollPane.   It is pure luck if the scrollbars show
up when they should.
Setting the 'prefered sizes' of the JTrees seem to screw up the
scrollbars.
It there any good guideline on how to program the combination of these
panes?
Just using the 'Design' view in JBuilder will not work.
I have to edit the code manually, but the is no guarantee that it will be
robust since I don't
know whtat I am doing.
Also, what about 'viewports' and should each pane be in the
constructor of the surrounding pane, etc, etc. ?
Anyway, just removing 'set prefered size' fixed the problems, but I don't

know why it works!

Best Regards,
Nils Thorell

"John P. McGrath" wrote:

> On Mon, 28 Feb 2000 11:54:41 +0100, Nils-Erik Thorell wrote:
>
> > Is it a bug or a feature?
> >
> > It seens to be impossible to set the divider position,
> > it will always go back to "29".   And then it shows up
> > at the top edge of the splitpane.
>
> The JSplitPanes layout manager sets the divider position based on the
> preferred and minimum sizes of the components.  Setting the divider
> position before the JSplitPane has been realized will have no effect,
> since the layout manager will reset the divider position.  After the
> JSplitPane has been realized, setting the divider position will work.
>
> --
> John P. McGrath
> <JPMcGrath@fast.net>
> <jpm@nscs.fast.net>
Technical Details
Message-ID: <38BBF5DF.3C036179@es.sigma.se>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38BA53F1.1799F1B6@es.sigma.se> <MPG.132533118c0249ed9897cb@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,797b2cd8aaf16ca9
X-Google-Attributes: gid111d45,public
From: Nils-Erik Thorell <net@es.sigma.se>
Subject: Re: JSplitPane does not remember the divider
Date: 2000/02/29
Message-ID: <38BBF5DF.3C036179@es.sigma.se>
X-Deja-AN: 591361838
Content-Transfer-Encoding: 7bit
References: <38BA53F1.1799F1B6@es.sigma.se> <MPG.132533118c0249ed9897cb@forums.borland.com>
To: "John P. McGrath" <JPMcGrath@fast.net>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Reply-To: net@te.mah.se
Newsgroups: borland.public.jbuilder.java.swing