JavaFX embedded in jme3

Ok. I’m using

<jme3.version>3.1.0-alpha4</jme3.version> ... ... <dependency> <groupId>org.jmonkeyengine</groupId> <artifactId>jme3-core</artifactId> <version>${jme3.version}</version> </dependency> <dependency> <groupId>org.jmonkeyengine</groupId> <artifactId>jme3-desktop</artifactId> <version>${jme3.version}</version> </dependency> <dependency> <groupId>org.jmonkeyengine</groupId> <artifactId>jme3-lwjgl</artifactId> <version>${jme3.version}</version> </dependency> <dependency> <groupId>org.jmonkeyengine</groupId> <artifactId>jme3-effects</artifactId> <version>${jme3.version}</version> </dependency>

wich means JME3 last alpha and LWJGL 3 i beleive.

The latest version of JME3 using LWJGL2, because LWJGL3 is an experimental feature, so you can’t use my version of JFX. :slight_smile: Please, use the original version.

Ok, thx for relpy.

I guess you are confused, @javasabr provide a fork of the project, with its own feature, build, and way to install.

@Empire_Phoenix, me and some others work on the project “JME3-JFX” hosted at GitHub - empirephoenix/JME3-JFX: JFX Gui bridge for JME with usefull utilities for common usecases.

you should be able to use JME3-JFX “original” into your maven project with :

<dependency>
  <groupId>com.jme3x</groupId>
  <artifactId>jfx</artifactId>
  <version>2.184.2016-04-30_145140-ccbd413</version>
</dependency>

<repository>
  <id>jmonkeyengine-contrib</id>
  <url>https://dl.bintray.com/jmonkeyengine/contrib/</url>
</repository>
  • No need to download the jar
  • This version was compiled with jme 3.1-beta1

PS: I also have my own fork, but for experiment, personnal use.

EDIT you could try to use the range version of maven (not tested personnaly):
For jme 3.0 user:

<version>[1.0,2.0)</version>

For jme 3.1 user:

<version>[2.0,)</version>

True. I literally confused :laughing:. Coz i spend much time to test GUI frameworks and understand what exactly fits better to my project and still not sure about that. And now i see pretty same (i thought :grin:) bridges to my favorite FX and still can’t use it because of can’t understand how to configure my POM. So shame… Sry for wasting ur time and again thank u for all replies and helps.

no problem, I know we have to improve the doc and the get started phase.
Keep us informe of your progress.

I use JME3-JFX in several projects.

Hi again! First results of using David’s library is cool. I can simply use HUD screens and dynamically change tham in runtime. Looks like root JavaFX Node is transparent by deafult and it is ok, coz we want see JME Scene under it. Now i have to step forward and my current task is “link JME Node and FXMLHud to show some info about this node”. Any advices appreciated

HI guys, I’ve been following this for a while but never really saw any reason to jump ship from nifty. Is there a “demo video” anywhere that shows some of the JavaFX specific features or implementations?

If you are happy with nifty, stay with it no reason to change it then :slight_smile:
Especially if you work jfx in day job or similar jfx has a few benefits as it has a quite richer support of features (eg image formats, webbrowser ect) however it has the limitation to only work on desktop. It runs in a second thread, so the jme framerate is not affected at all by the complexity of the ui, however there is a higher static cost due to required buffer copying.

2 Likes

I switch to jfx, mainly for :

  • style by css (like)
  • the Scene Builder tool, that allow to visualy design/layout your 2D GUI.

Else, I’m not aware of a dedicated “demo video”. On this thread, you saw some screenshot, else I made some video of my game.

Maybe, this video of a skeleton project I made, could be a sample for you.

2 Likes

Is this skeleton project available somewhere?

the skeleton is available at GitHub - davidB/jme3_skel: my project skeleton for jme 3.0 projects (gradle based) (I thought I have some recent change not pushed). I’ll try to push today or tomorrow.

2 Likes

Hy there,
One short question about the JmeFXContainer and GUIManager:
I can get the EmbeddedWindow from the JmeFXContainer.with guiManager.getjmeFXContainer().getStage();
When i do a cast to (Stage)guiManager.getjmeFXContainer().getStage();
It fails as it says its no Stage object.
How can i get my FX-Stage out of that jmeFXContainer ?
Thanks in advance,
Härry

There is no real Stage in the integration, as no real window does exist. What you can get is the integration interface that does a similar role.
What are you trying to do?

I just get a handle to my controller and get references to everything from there.

Implemented two scene processors for showing jME in an ImageView and Canvas of JavaFX.

1 Like

Starting from java 11, JavaFX will not be included as part of JRE, it will be like an external library, which developers can use as maven/gradle dependency. So, I think javaFX will be more relevant GUI framework for jME in near future. :slight_smile:
Also, I’m going to continue supporting integration javaFX with jME :slight_smile:

3 Likes

I don’t understand how

makes you think

What is this, “relevancy through exclusion”? :slight_smile:

I think working on integration is much easier when you work with a library instead a part of SDK :wink: especially when we talk about internal classes. Also, now we have github mirror of openJFX where you can offer your PR’s :wink:

1 Like