2

I'm having trouble with a JButton. I'm working with the Seaglass Look-and-feel and i want to add a Icon to my JButton. But right now it doesn't fit, I have no idea what the problem could be. I use it on a JPanel that has a Flowlayout.

removeButton = new JButton();
        removeButton .setIcon(new ImageIcon("ICON/remove.png"));
        removeButton .setToolTipText("Remove");
        removeButton .setRolloverIcon(rolloverIcon2);
        removeButton .setBorderPainted(false);

enter image description here

Rocksteady
  • 271
  • 1
  • 4
  • 21

1 Answers1

4

JButton#setContentAreaFilled(false);, example here

Community
  • 1
  • 1
mKorbel
  • 109,525
  • 20
  • 134
  • 319