|
-
Dec 1st, 2003, 04:43 PM
#1
Thread Starter
Addicted Member
JSplitPane Problems
Hello
I'm having probelms with jSplitPanes
I set them up and set the left and right, or top and bottom components, however when the screen actually laods and paints itself the actuall splits are either at the top or to the left, and using the setDividerLocation(0.75) dosen't have any effect,
am i doing something silly, is there another command i should be using pre or post or is there another way of ensuring that the splits start in the place i want?!
Cheers in advance
Andy
-
Dec 3rd, 2003, 11:10 AM
#2
You're probably experiencing this:
If the split pane is not correctly realized and on screen, this method will have no effect (new divider location will become (current size * proportionalLocation) which is 0).
From the JSplitPane.setDividerLocation(double) docs.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 3rd, 2003, 11:17 AM
#3
Thread Starter
Addicted Member
thats the one, i've re-arranged my code and set the divider locations after they are visible, which is not what i wanted, but will have to do.
From everything i've read about it it seems it sbeen around since 1.1 and Sun haven't seen fit to repair it!
Ahh well
Cheers!
-
Dec 4th, 2003, 04:03 AM
#4
You can always use setDividerLocation(int), it works on invisible widgets too.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|