This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JButton with multiple lines" Watch "JButton with multiple lines" New topic
Author

JButton with multiple lines

Bill Norton
Greenhorn

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.
Thanks,
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? "

http://www.javaworld.com/javaworld/javaqa/2000-03/01-qa-button.html
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JButton with multiple lines