Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

jsplitpane - set divider location ??

Thread view: 
Rajesh.Rapaka - 27 Sep 2006 15:25 GMT
Hi,

I was trying to use the JSplitPane's setDividerLocation(Double) method.
But seems like it does'nt work.

A brief search in the groups resulted in solutions like setting the
everything to visible(true),
Pack() , show() etc.

But nothing worked !!

I guess the problem is prevailing right from 2000!! Did'nt java yet
correct the bug?? ( I've seen complaints about the bug in the java
tutorial and some posts also).

Is there a way by which i can solve this??
Thanks in Advance.
Dan Andrews - 27 Sep 2006 15:56 GMT
> Hi,
>
[quoted text clipped - 13 lines]
> Is there a way by which i can solve this??
> Thanks in Advance.

Hi Rajesh,

Here are a couple of snippets including programmer comments from the
BasicSplitPaneUI and as far as I know this hasn't changed much in 1.4,
1.5, or 1.6. I believe the problem is in the BasicSplitPaneUI. I've
always been disappointed with the behaviour of the JSplitPane and I
think you can see from the comments in the code that the programmer
wasn't entirely satisfied either. Have a look at the BasicSplitPaneUI
to see if it gives you any insights to solving the problem you are
experiencing.

   [snip]
   /** Indicates that we have painted once. */
   // This is used by the LayoutManager to determine when it should
use
   // the divider location provided by the JSplitPane. This is used as
there
   // is no way to determine when the layout process has completed.
   boolean             painted;
   [snip]
   if (painted) {
       // This is tricky, there is never a good time for us
       // to push the value to the splitpane, painted appears to
       // the best time to do it. What is really needed is
       // notification that layout has completed.

Cheers,

Dan Andrews
- - - - - - - - - - - - - - - - - - - - - - - - -
Ansir Development Limited http://www.ansir.ca
- - - - - - - - - - - - - - - - - - - - - - - - -


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.