Reputation: 4106
Is it possible to change the shape of JButton from rectangular to say round?
Upvotes: 5
Views: 27893
Reputation: 7890
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);
Upvotes: 8