void (boolean cancelled) { Object[] listeners = myListenerList.getListenerList(); // process the listeners last to first, notifying those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == CellEditorListener.class) { // Lazily create the event: if (myChangeEvent == null) { myChangeEvent = new ChangeEvent(this); } CellEditorListener listener = (CellEditorListener)listeners[i + 1]; if (cancelled) { listener.editingCanceled(myChangeEvent); } else { listener.editingStopped(myChangeEvent); } } } }