Is it possible to change the shape of JButton from rectangular to say round?
Asked
Active
Viewed 2.6k times
2 Answers
8
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);
5
You can also use an image over the button .

Rish
- 447
- 7
- 24
-
Sorry Rish, I cannot mark your answer as correct, as it is not the exact thing I am looking for, though I liked the concept of using an image. – Vikram Jul 31 '12 at 14:47