question: public static boolean checkImageIndex ( ) { if ( _indexChanged ) { int result = JOptionPane . showConfirmDialog ( null , Bundle . getMessage ( "SaveImageIndex" ) , Bundle . getMessage ( "question" ) , JOptionPane . YES_NO_CANCEL_OPTION , JOptionPane . QUESTION_MESSAGE ) ; if ( result == JOptionPane . YES_OPTION ) { storeImageIndex ( ) ; return true ; } else if ( result == JOptionPane . NO_OPTION ) { indexChanged ( false ) ; } } return false ; }
target:  Called from window close of Icon Editors