explorer = new PictureExplorer(pix); explorerFrame = explorer.getFrame(); explorerFrame.setDefaultCloseOperation( WindowConstants.DO_NOTHING_ON_CLOSE);