I made a swing application, where I have need to shape the windows as I want.
So for this purpose, I made a polygon which is equivalent to my desire shape, and then call
setShape(myPloygon) method, by which a frame is create in custom shape.
final Window w = new TestFrame();
w.setVisible(true);
Polygon polygon=new Polygon();
polygon.addPoint(10,0);
polygon.addPoint(0,10);
polygon.addPoint(0,573);
polygon.addPoint(10,583);
polygon.addPoint(570,583);
polygon.addPoint(580,573);
polygon.addPoint(580,545);
polygon.addPoint(720,545);
polygon.addPoint(730,535);
polygon.addPoint(730,90);
polygon.addPoint(720,80);
polygon.addPoint(580,80);
polygon.addPoint(580,10);
polygon.addPoint(570,0);
w.setShape(polygon); //method in jdk7
If use JDK 6 then
com.sun.awt.AWTUtilities.setWindowShape(w, polygon);
It runs perfect on windows, but while I try it on Mac then window shape function do not create any shape, it shows the full window only
So what should I do?