This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Wrap Text in a JButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Wrap Text in a JButton" Watch "Wrap Text in a JButton" New topic
Author

Wrap Text in a JButton

Patrick Muls
Greenhorn

Joined: Aug 08, 2001
Posts: 25
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

Joined: May 17, 2001
Posts: 2823
HTML can be used in Swing components.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wrap Text in a JButton
 
Similar Threads
overlay jpeg with text
Html:Textarea Tooltip
JPanel and text
Appending data to Excel sheets
Java Regular Expressions