jsplitpane - set divider location ??

R

Rajesh.Rapaka

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

Dan Andrews

Rajesh.Rapaka said:
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
- - - - - - - - - - - - - - - - - - - - - - - - -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,081
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top