Workaround to position splitter?

I'm trying to position a horizontal splitter bar, and no matter what value I use for


it doesn't seem to have any affect.  (I've tried 0.5, 0.1, etc)  My splitter has setOneTouchExpandable = true, and its size is 10 in case it matters.  

NT/98, Swing 1.0.1

Who is Participating?
conickConnect With a Mentor Commented:
The components on both sides of the divider may already be at its minimum size.
The divider cannot make a component less than its minimum size.
The divider uses the preferred size of the components to set its initial position.  However there are many times that preferredSize == minimumSize when you dont explicitly set the minimumSize or preferredSize.
(I didnt say that very well)
To make my gibberish make sense:
Explicitly set the minimum size of each of the components with (setMinimumSize()).  This should allow the divider to move.
tsxtsxAuthor Commented:
Still doesn't work -- both sides of the splitter have preferred sizes of 300,300 and min sizes of 2,2 and it still won't move.

Other ideas?
I thought for sure that would work...
You may want to reject my answer so other experts may feel more inclined to get involved..
Also, please post the code you are using.. or better yet give an runnable example that demonstrates the problem?
Does it work when you specify pixels instead of percentages?
Is this only a problem when you programmically try to set the divider location or is it a problem with manual moves also?
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  Or if you are an EE Pro user, click the link below to select open items for your Member ID using Power Search:

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.
Thank you,
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.