Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Image on the right side of a JButton  RSS feed

 
John Smith
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to show an image to the right of the text label in a JButton?
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the method:
setHorizontalTextPosition(SwingConstants.LEFT)
or SwingConstants.LEADING.
 
John Smith
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Roy!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!