confirm exit netbeans desktop apps

do this..

        app.addExitListener(new ExitListener() {
            public boolean canExit(EventObject e) {
                return formWindowClosing();
            public void willExit(EventObject e){


    private boolean formWindowClosing() {
        if(JOptionPane.showConfirmDialog(this.getFrame(), "Exit Application?", "Confirm Exit", JOptionPane.YES_NO_OPTION) ==
            if (runner != null)
                if ( runner.isAlive())
            return true;

        return false;

And the world shines bright again..


  1. #1 by senny on April 25, 2010 - 12:17 pm

    hah? apaan itu? sejenis mantra biar dapet jodohkah?

  2. #2 by havban on May 5, 2010 - 5:39 am


    itu adalah jampi2 penolak jodoh.. huahuahua…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: