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;
}

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 ; }
called from window close of icon editors
