Reputation: 7594
I don't know whether it is possible or not.Is there any way to change the shape of jframe into circle
Upvotes: 2
Views: 3179
Reputation: 11
//You can change the shape of JFrame import java.awt.geom.*;
setUndecorated(true);
Ellipse2D.Double E=new Ellipse2D.Double(0,0,500,500); //nested class Double##
- Heading
##
setShape(E);
setVisible(true);
Upvotes: 1
Reputation: 23560
Essentially what you have to do is make the outer part of your JFrame rendered surface transparent and then draw your own custom shape in the middle.
This will get you started:
http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/
And this is a finished implementation:
http://www.codeproject.com/KB/java/shaped-transparent-jframe.aspx
Upvotes: 5