static A doNothingOnClose(final A w) { if (w != null) swing { w.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); } ret w; }