This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes JButton with multiple lines Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JButton with multiple lines" Watch "JButton with multiple lines" New topic

JButton with multiple lines

Bill Norton

Joined: Mar 29, 2001
Posts: 27
I want a JButton with more than one line, is this possible?
I thought about using a .gif with the text I needed, but curious if there was an easier way, I am missing. Also, thought it might look weird next to other buttons if the window gets resized.
Looking forward to any ideas.
Bill Norton
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
Have a look at "A multiline button is possible!
Can JButton create a multiline button? "
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
I read somewhere that the p tag is the way to go not br like the first example at the bottom of the java world article.
I agree. Here's the link:
subject: JButton with multiple lines
It's not a secret anymore!