Tried to embed jme into javafx and had some problems

A simple attempt to embed javafx in jme

And when it runs, it finds that nothing happens.

If I use breakpoints and debug, I get a window (I guess it’s multi-threading but I don’t know exactly what’s wrong I don’t understand Java multi-threading very well).

If anyone has the time and is willing, please guide me and give me some tips

Note: The jmeinjfx shipped with the jMonkeyBuilder is no longer maintained anymore and has some hidden bugs.

I recommend using this:

Maintained by @tlf30.


Thank you for your reply

Can I get the jme screen to draw in the Javafx control?
Can you give me a simple example

Yes, I think you can do it using this library:

Here is an example I guess

Disclaimer: I have not used it myself and do not know how it works!

1 Like

The variable used in this archive is “started” to determine if jme is ready instead of “initialized”, but in the demo it is “initialized” which causes the program to not display the window

So I’ve figured out why my jfx doesn’t show

@icyboxs I just replied to you PM.

For reference for everyone else. I did a lot of experimenting with this late 2020.
I have an example of my efforts here: jfx-in-jme-in-jfx/src/main/java/io/tlf/jme/jfxtest at main · tlf30/jfx-in-jme-in-jfx · GitHub

I don’t remember how well it works, but I do know it had some issues. Iirc I think there is an offset from where the viewport is and where it thinks it is for input.

My current jme jfx bindings have the necessary code to replicate this example if I remember correctly, and can be used to accomplish jfx in jme in jfx.

1 Like