I could not find any answer related to this question. I wonder if it is possible. Here is my problem.
I have a core processing application written in Fortran. The application needs a new UI. The Fortran code has its own main loop. It communicates
with the UI through a interface routine. This routine calls the main event loop of
whatever UI library that its used, for example the current UI is Motif. So it calls
the Motif main event loop. I would like to replace Motif with Java swing. I could not find thing on Java main event loop. My questions are
1) Is it possible to call Java main loop directly ?
2) I know it possible for Java to call another language. How can another language call a Java routines ?
-------------- Additional comments
It looks like it might not be possible to do this, at least not the way I envision it. Here is an algorithm that I try to use
do loop until terminate
do some internal processing
1 check ui event queue
if queue has event
2 call ui event dispatcher for all UI events
end loop
what I like to know, is there any kind of routine to replace #1 and #2. I was hoping Java has something like EventQueue.hasEvent ();
EventQueue.dispatchEvent (event);
From the comments so far, it does not look like there is such a thing.