Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem about display both icon and text on a JButton!

843804Mar 29 2004 — edited Dec 10 2004
I want to put a icon on the upper part of the button, and some text on the bottom part of it. But when I use
setIcon() and setText() methods of JButton, I found the text is in the right of the icon, this is not what I want!
I've tried some methods dealing with the text alignment, but it doesn't work. How can I get what I want?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2005
Added on Mar 29 2004
4 comments
250 views