I have a program in Java and would like to remove these borders that appear in the button text:
(The red borders were in the edition the ones I want to remove are those dark blue inside the red ones)
Set Component#setFocusable()
with false
causes that border around the text to be removed. In fact this is indicative that the component is focused.
JButton foo = new JButton();
foo.setFocusable(false);
You can remove as renan has spoken but will run out of focus to access the buttons with the tab and the spacebar for example.
setFocusable(false);