I'm trying to bring my window to focus on a keypress (using jnativehook), but getting this error:
java.lang.IllegalStateException: This operation is permitted on the event thread only; currentThread = JNativeHook Dispatch Thread` exception.
It seems like I can't change the UI from the hook's thread.
Is there any way, to get the stage to the foreground? I'm open to using other key hooks, if necessary.