Generally, yes. The JButton has an actionListener which has an actionPerformed() method. In the actionPerformed() method, call the windowClosing() method. If you want more specific help, show some...