Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clipping a button in Swing

Status
Not open for further replies.

dcusick

Technical User
Aug 9, 2000
271
US
Hey all.. Hope someone can give me a quick hand here... I have a JButton that I would like to clip down to a rectangle... I set the icon of the button to a elliptical image. I took off all borders, so right now it just looks like an elliptical button. What I want to do is chop off the two ends and keep the middle, so it'll look like a rectangle. I tried to use the setBounds property, but that doesn't seem to want to work. Any easy way to do this? Thanks...

Doug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top