Is there a way to remove the rectangular border under the button?
I wish to make it transparent, is it possible?
Here is the image:
Is there a way to remove the rectangular border under the button?
I wish to make it transparent, is it possible?
Here is the image:
You can use this code segment, where b
is the instance of your JButton.
For only remove rectangular border just use
b.setBorderPainted(false);
To make button transparent:
b.setOpaque(false);
b.setContentAreaFilled(false);
b.setBorderPainted(false);
Also remove Painted focus add this
b.setFocusPainted(false);
you can use the following code to remove border:
yourbutton.setBorderPainted(false);