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