Example: Handling About

public class MacOSHandler extends Application {

    private Dialog about;
    
    public MacOSHandler(PlayerFrame frame) {
        about = new AboutDialog(frame);
        addApplicationListener(new AboutBoxHandler());
    }

    class AboutBoxHandler extends ApplicationAdapter {
        
        public void handleAbout(ApplicationEvent event) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    about.setVisible(true);
                }
            });
            event.setHandled(true);
        }
        
    }
  
}

Previous | Next | Top | Cafe con Leche

Copyright 2005, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified January 18, 2006