This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • 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.
 
this is supposed to be a surprise, but it smells like a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!