Running JME game inside JavaFX when required

Hello friends,

We have a JavaFX app running on our system and we are actively working on a game with JMonkeyEngine… Now, once the game is completed, what we would like to do is integrate the game in the JavaFX app, but the point is, we don’t want the game to be running all the time. There would be a button in the menu, and when the user clicks it, a game will be loaded and JavaFX UI disappears. Do I require to connect JavaFX UI with JME for this purpose? If yes, is this possible? I found this link, is this useful? Kindly let me know. Thank you.

If you want to start JME in a new window, you can start it like it’s done from the void main and when it closes you are back to jFX.
But dunno how to do it in the same window.