This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Forcing JTextArea to respect its size

 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I put a JTextArea in a JPanel with BoxLayout, it will not display in its given size. It will take up all the panel if no other components exist. I tried to put an empty border in the JPanel and it even ignores that.

How do I force it to accept the preferred height and width?
[ July 13, 2006: Message edited by: Rusty Shackleford ]
 
Nick Meverden
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, at first it didn't work, then applied to JScrollPane it did. Except for some reason the height of it.
[ July 13, 2006: Message edited by: Rusty Shackleford ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic