Is it possible to change the shape of JButton from rectangular to say round?
Link provided by Sean Cogan is all you need. If you want it in short ,set an image (rounded or any shape that you want your button should look alike)
using setIcon
and then on the JButton (button1) set these values -
button1.setContentAreaFilled(false);
button1.setFocusPainted(false);
button1.setBorderPainted(false);
You can also use an image over the button .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With