• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about component sizes  RSS feed

 
Robert Miller
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having some problems understanding how components are sized and I hope someone can help clear them up for me.

I have a panel which is using a BorderLayout. I have a panel in WEST and a panel in CENTER. The panel in CENTER contains a JScrollPane which contains a JTextPane. It seems like no matter what I do the scroll pane and the text pane all appear very small, about one line high and one character across. I want it to fill the entire region.

I am almost embarrassed to ask the question because I suspect it is very easy to solve, but I'm also new at Swing. Can anyone tell me what I need to do to get the component to fill up the region?

Thanks,

Robert
 
jefff willis
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
would it be possible for you to supply some code?
 
Don Kiddick
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your panel in CENTER should also use BorderLayout. The JScrollPane should be in the CENTER of this panel.

hth. D.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!