Set instantiateNewObjects () throws IOException { try { // #17341. The problem is handling ESC -> value is not // set to CANCEL_OPTION for such cases. Object option = getValue(); if(option == FINISH_OPTION || option == YES_OPTION || option == OK_OPTION) { // show wait cursor when handling instantiate showWaitCursor (); newObjects = handleInstantiate (); if (lastComp != null) { lastComp.removePropertyChangeListener(propL()); lastComp = null; } } else { if (lastComp != null) { lastComp.removePropertyChangeListener(propL()); lastComp = null; } newObjects = null; } } finally { // set normal cursor back showNormalCursor (); } return newObjects; }