I’m making a program which includes JButtons with the text “+” and “-” on them. Why does the JButton have an outline around the text within? How do I get rid of the square around the text for a cleaner look?
Image here shows the issue on the first red button.
Advertisement
Answer
Use the jbutton.setFocusPainted(false);
method.