/** Adds the listeners for the "how to" window */ public void addHowToWindowListeners() { // Called when clicking on the "close" button win.getHowToWindow() .getCloseButton() .addActionListener( new ActionListener() { public void actionPerformed(ActionEvent arg0) { win.getHowToWindow().dispose(); win.setHowToWindow(null); } }); }