CodingNinja
CodingNinja

Reputation: 257

How to get rid of text outline on JButton

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.

GUI image

Upvotes: 0

Views: 173

Answers (1)

Programmer
Programmer

Reputation: 813

Use the jbutton.setFocusPainted(false); method.

Upvotes: 4

Related Questions