static void setWindowShape(Window w, Shape shape) { if (w != null) swing { w.setShape(shape); } }