Do we have a round button. Can we have a round button which is not awt component.It should be a bean where i can change the size and color of button.

Scott Stanchfield

You can create a subclass of Component, (called ShapedButton, for example.)

This creates a lightweight component, that you can see through.

The new component actually takes up a rectangular area on the screen, but you can see through any part that you don't paint in.

The trick to making this work properly, is to only paint in the area you care about, and change your event handling to double-check that the user is interacting with the component inside that area.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact