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