Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > jsplitpane - set divider location ??

Reply
Thread Tools

jsplitpane - set divider location ??

 
 
Rajesh.Rapaka
Guest
Posts: n/a
 
      09-27-2006
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.

 
Reply With Quote
 
 
 
 
Dan Andrews
Guest
Posts: n/a
 
      09-27-2006
Rajesh.Rapaka wrote:
> 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.


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
- - - - - - - - - - - - - - - - - - - - - - - - -

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSplitPane RC Java 8 12-15-2009 10:42 AM
use of JSplitPane. Eitan M Java 5 08-15-2007 06:19 PM
Why does JSplitPane automatically set its location? Allen Java 1 07-17-2006 07:34 AM
MCU clock divider vs. VHDL divider Matt Clement VHDL 3 04-28-2006 01:24 PM
JSplitPane. Kalpesh Modha Java 4 09-22-2004 04:25 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57