• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing the shape of JButton ?

 
Mufaddal Khumri
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I am trying to change the shape of JButton. I have understood that for this I have to use the ButtonUI class and the UIManager class. But somehow I havent been able to bridge all the bits of information. Does someone have a code example showing a JButton of a shape other than the standard rectangular shape ?
Regards.
 
Paul Stevens
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch! Please adjust your displayed name to meet
the <BR>JavaRanch
Naming Policy
. <BR>You can change it here.<BR><BR>Thanks!
and welcome to the JavaRanch!
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen that example as well as others before, and not that I could do any better, but those buttons are just plain ugly.
How about an example of a nice raised border Swing Round Button? I mean one exactly like the standard swing button, but round?
 
Mufaddal Khumri
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sashi , but I had come across that link already. I want something more like what Greg described. The button needs to look like a button like JButton , just another shape. Not just a colored circle or something.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic