MapHandler.add_map_element(JavaEventHandler.signal_memory, s, SignalHandler.SIGNAL);
MapHandler.add_map_element(JavaEventHandler.signal_memory, SignalHandler.SIGNAL, s);
    protected void dispatchEvent(java.awt.AWTEvent evt) {        LogHandler.log(LogHandler.INFO_LOG_LEVEL, "Dispatch event: " + evt);        //?? For now, we also call the AWT event handling.        //?? (javax.swing.AbstractButton etc. still use java.awt.event.ActionListener)        //?? Later, we will cut it off by removing this line.        //?? I tried removing this line:        //?? - the frame/window still gets created        //?? - but no contents (menue and other components) is shown        //?? Checking this out later.        super.dispatchEvent(evt);        try {            // Create signal for storage in signal memory.            Signal s = new Signal();                if (s != null) {                    JavaEventHandler.transform_event(s, evt);                                // Only send a new signal (store in signal memory) if an action exists.                // Otherwise, the chain of signals/ actions finishes here, until a new                // hardware event (interrupt) occurs.                if (s.predicate != null) {                                        // Caution! Adding of signals must be synchronized between:                    // - SignalHandler.send for adding internal CYBOP signals                    // - JavaEventHandler.dispatchEvent for adding transformed java event signals                    // These are the only procedures accessing the signal                    // memory for adding signals.                    synchronized (JavaEventHandler.signal_memory) {                        // Add signal to signal memory (interrupt vector table).                        MapHandler.add_map_element(JavaEventHandler.signal_memory, s, SignalHandler.SIGNAL);                    }                } else {                                        // Do not log this as the loop runs infinite and would stuff the log record!                    // The action is null. No signal gets stored in the signal memory.                    // The signal needs to be destroyed again.                    s = null;                }                } else {                    LogHandler.log(LogHandler.ERROR_LOG_LEVEL, "Could not dispatch event. The signal is null.");            }        } catch (Exception e) {            LogHandler.log(LogHandler.ERROR_LOG_LEVEL, "Could not dispatch event. An exception occured:\n" + e);        }    }