I don't know w开发者_如何学JAVAhether it is possible or not.Is there any way to change the shape of jframe into circle
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
//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);
精彩评论