• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsplitpane resizing problem

 
eric vitallis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i have a jsplitpane that has a jscrollpane on the left on the right.The one on the left contans a jtree while the one on the right contains several jpanel(and different layout managers).The problem comes in the displayam of the split pane, its compressed and i have to manually resize it to see the components.

i thot that on calling the frame's pack(), the frame is resized according to the components it contained but apparently this isn't the case.Further more,
i displayed the components' sizes and they're all Dimension(0,0).

Seems i forgot something , or should i expicitly set some minimum size to all jpanels .. am really not sure of what to do , so if anyone could give me an idea , i'd be super grateful.
Thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a forum where the AWT and Swing gurus hang out, so I'm moving this thread there.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "myfname mylname"-

Welcome to JavaRanch.

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.

Enyoy your time here.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
give each scrollPane a preferredSize
 
eric vitallis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry for the name thing.. been to so many forums but gotta admit that this one is wow and super effective, thanks alot for the answer ,i had tried too many things that i ended up confusing myself, once again , thanks
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey eric, thanks for changing your name promptly. Would you also add a last name, please? It doesn't have to be real if you're not comfortable with that, but it should at least seem real.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!