for (Iterator iterator = actionEvents.entrySet().iterator(); iterator.hasNext();) { Map.Entry entry = (Map.Entry) iterator.next(); Action action = (Action) entry.getKey(); ActionEvent event = (ActionEvent) entry.getValue(); action.actionPerformed(event); } actionEvents.clear();
fireKeyEvents();
    public void fireFinalEvents() {        for (Iterator iterator = actionEvents.entrySet().iterator(); iterator.hasNext();) {            Map.Entry entry = (Map.Entry) iterator.next();            Action action = (Action) entry.getKey();            ActionEvent event = (ActionEvent) entry.getValue();            action.actionPerformed(event);        }        actionEvents.clear();    }