0

Here's a picture of part of my interface. The image is circular with a transparent background but it doesn't center properly within the button. I was wondering if I could manually move it into position.

mKorbel
  • 109,525
  • 20
  • 134
  • 319

1 Answers1

0

All you have to do is create a JToggleButton and then set the icon of the button to the image you are using

  JToggleButton button = new JToggleButton(new ImageIcon("path to image"));

that should create the button, and put the image into the center of the button.

Hope that helps!

user2277872
  • 2,963
  • 1
  • 21
  • 22