• Post Reply Bookmark Topic Watch Topic
  • New Topic

JPanel size  RSS feed

 
Nickolay Kolev
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Is there a way to set the width of a panel only? setPrefferedSize and setMaximumSize do work for both dimensions.
I want to place labels on panels but they can get very long, so I want to make the text wrap... But because I have nested panels generated dynamically i never know how many i will get, i can not set a fixed height...
Many thanks,
Nickolay Kolev
 
Bill Liteplo
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bill
 
Nickolay Kolev
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks bill!
will try that!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!