public class MyApplicationAdapter extends ApplicationAdapter
{
private DesktopShield handler; public MyApplicationAdapter(DesktopShield handler){this.handler = handler;}
public void handleQuit(ApplicationEvent e){System.exit(0);}
public void handleAbout(ApplicationEvent e)
{
// tell the system we're handling this, so it won't display
// the default system "about" dialog after ours is shown.
e.setHandled(true);
JOptionPanel.showMessageDialog(null, "About dialog");
}
public void handlePreferences(ApplicationEvent e)
{
JOptionPanel.showMessageDialog(null, "Preferences dialog");
}
}