Search code examples
javaswingbuttonlines

Removing lines around button after it's clicked in Swing


I have a JButton in Java(Swing):

Button

After the click I get this line around the button:

enter image description here

How do I remove these lines?


Solution

  • button.setFocusPainted(false); is the right solution!