Package org.jdesktop.application.Application

Examples of org.jdesktop.application.Application.ExitListener


        initComponents();

//        activePanel.addPropertyChangeListener(new PropertyChangePassing(this));

        // Ask for confirmation on exit
        getApplication().addExitListener(new ExitListener() {
            public boolean canExit(EventObject arg0) {
                return releaseFile();
            }
            public void willExit(EventObject arg0) {
                if (preferences != null) saveState(preferences);
View Full Code Here


        }
        jTextField2.setText(saveFolder);
        dObjects = new DownloadableObjects[4];

        //adding exitListener
        PlayDownloaderApp.getApplication().addExitListener(new ExitListener() {

            public boolean canExit(EventObject eo) {
                if(progressBar.isVisible()){
                    int out = JOptionPane.showConfirmDialog(mainPanel, "You have still unfinished downloads.\n\nAre you sure you want to quit?");
                    if(out == 1) return false;
View Full Code Here

TOP

Related Classes of org.jdesktop.application.Application.ExitListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.