Is there any way to change the position of the icon image in JButton?
Here's what it looks like now:

I want to move the icon more to the left.
I tried changing the alignment of the text, but it does not work the way I want:
myButton.setHorizontalTextPosition(SwingConstants.RIGHT);
source
share