dcsimg

Is it possible to show a a modal dialog in the destroy() method of an applet? If so, how?

Sachin Patil

Yes, you will have to overwrite the method destroy() of the derived applet and call destroy method of an applet in there. Like


public void destroy(){
  JOptionPane.showMessageDialog (null,
    "You are exiting the Application.... Bye", 
    "Bye", JOptionPane.WARNING_MESSAGE);
  super.destroy();
}