jbutton remove selection border

Java
yourJButton.setFocusPainted(false);
Source

Also in Java: