aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JButton Round Shape Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JButton Round Shape" Watch "JButton Round Shape" New topic
Author

JButton Round Shape

Naveen Kumar
Ranch Hand

Joined: Dec 14, 2006
Posts: 35
Hi All,

Is it possible to change the shape of a JButton/Button to be Round?
Could you please send me sample Code.

Regards
Naveen
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
search the forum for
circular buttons

you should find what you are looking for
Malith Yapa
Ranch Hand

Joined: Jan 17, 2007
Posts: 45
What you have to do is create your own button class which extends from jbutton or button.

**) After that you can simply override the paint method(create your own) and draw the actual thing you want the button to look like. Could be round or anything. You'll need to have some skill though. After some time it won't be much of a problem..

Otherwise unless you use some new package (which is not found in the api) you better stick to the **) method
Brian Cole
Author
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
Well you don't have to create your own button class. You could try something like this:



It depends on what you want to do.


bitguru blog
 
 
subject: JButton Round Shape