Why does the slider position of my JSplitpane change to zero and why does my JTree expand when I change the look&feel of the underlying Component?

Sandip Chitale

Do both the components start in that manner at the beginning of your application also ? (A change in look and feel will also do the same as the components go through a rebirth of sorts - uninstallUI(), installUI()).

If so as far as the SplitPane is concerned it seems that the component in the right(bottom) pane seems to have a very large getMinimumSize().width (getMinimumSize().height).

Another possibility is that the component in the left (or top) pane seems to have zero getPreferredSize().width (getPreferredSize().height). In general the SplitPane tries to honour the getMinimumSize(), getPreferredSize() and getMaximumSize() for each of the components. Therefore make sure that the components in left (top) and right (bottom) pane return good values for each of these calls.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact