public void actionPerformed(ActionEvent e) {
                // Prompt the user to see if they really want to exit.
                int result = JOptionPane.showConfirmDialog(frame,
                        "Are you sure you want to exit the application?",
                        "Exit Application", JOptionPane.YES_NO_OPTION);

                if (result == JOptionPane.YES_OPTION) {
                    try {
                        // If YES, release the user
                        clientModel.releaseUser();
                        frame.setVisible(false);
                        frame.dispose();
                    } catch (IOException e1) {
                        e1.printStackTrace();
                    }
                }
            }