Skip to content
Advertisement

Swing – How to modify the border color of a JButton?

How to modify the border color of a JButton?

I want to get something like this:

enter image description here

But I can´t modify the color, the borde is black:

enter image description here

And If I try to add a LineBorder or any other borde, I am not able to remove the inner border:

enter image description here

Advertisement

Answer

I tried an example below and all seems fine, unless you are doing something different:

enter image description here

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement