• Post Reply Bookmark Topic Watch Topic
  • New Topic

JButton with Rounded edges  RSS feed

 
Ravi Gupta
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone tell how to get buttons in Swings with curved edges?
Regards
 
Alex Kravets
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to create an image in PhotoShop with rounded edges and put in on the button. that the only way.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not the only way, but that is by far the easiest way. Otherwise you have dig deep into the Button UI and over ride the paint() to paint it how you want to.
I would use an image.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!