public void windowClosing(WindowEvent evt) {
            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 {
                    clientModel.releaseUser();
                    frame.setVisible(false);
                    frame.dispose();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }