I was wandering how easy is to interface existing Java programs/GUIs inside a game loop. Sorry if my question is a bit vague. I'll try to explain.
I am currently designing a simulation environment for a work-station. We have the actual programs running in the real compunters (which have a java GUI and run on linux virual machines). We also have 3D models of the room, chairs, monitors, etc. We can render those in Unreal engine. Currently, I have hard-coded very simple monitor textures that represent the programs running on the computers, but ideally, the player should have have the same experience as being in the actual control room, meaning that he should be able to use the programs in the same or almost the same manner.
My question is if it is possible to interface the I/O of the actual programs within the simulation. More specifically, if it possible to render the java awt as textures for the monitors, as well as taking the player actions and feeding them in the program as inputs. The actual program code may run inside or outside the game loop (preferably outside, in its native virtual machine).
Can you please direct me to the right path, since I am only remotely familiar with game development. Thank you in advance!
Edit: Just to clarify one thing: Running the program on an external machine (virtual or physical) and feeding this machine's display to a local texture is acceptable, but I was wandering if it could be possible to use Java's GUI library output directly into the game loop (instead of the host machine). I suppose this has to be supported by the game engine (eg. having support for an in-game desktop-environment/window-manager). Unreal engine was just chosen for testing. Any engine recommendation is welcome.