Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrap Text in a JButton

 
Patrick Muls
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a set of buttons going done the east-side of my GUI. One of them has to contain a text that is much longer then that in the others, so I'm considering wrapping it to prevent that one button from expanding to much. I tried adding the \n-escape sequence, but that doesn't help. Which solution should I use?
------------------
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HTML can be used in Swing components.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic