Link to home
Start Free TrialLog in
Avatar of hipal
hipalFlag for United States of America

asked on

Circular JFrame

Overwhelmed with the help so far...
thanks a lot all .

I am trying to get a JFrame in the shape of a circle ..

I will be really grateful if someone can give some code snippet ..

thanks again !
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Not possible i'm afraid. JFrame is a top level window and they are never round
Avatar of hipal

ASKER

how about JPanel ?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
All components are rectangular by definition, and top level windows are tied to the native window system which is also rectangular.

you can give a component the illusion of not being rectangular by leaving the background transparent.
Avatar of hipal

ASKER

thanks all ..

can I do similar things for JButton ?
Avatar of hipal

ASKER

@CHEJ .. I am not able to find the code for the link you send :(
How does that help you exactly?
(and you don't need to write any native code)
>>@CHEJ .. I am not able to find the code for the link you send :(

I think you'll need to check it out from Subversion (for which you'll need an account)

https://jna.dev.java.net/source/browse/jna/