jMonkey and JavaFX

Hey Guys,

I was wondering if there was a way to overlay JavaFx with jMonkey, much like Nifty GUI. Any advice or hint of what direction to take would be much appreciated.



Thanks for taking time to read this post.

JavaFX is swing, so all of that applies.

If you mean use JavaFX in-game (instead of Nifty) then I guess the short answer is no and the long answer is look at how Nifty do it :slight_smile: If it is the other way around (jME-“component” in a JavaFX app) then like Normen said.

3 Likes

Ok thank,



jmassing, I was looking for first one, using JavaFx instead of NiftyGUI.



Thanks Guys!

Nifty is designed for games, JavaFX… well I don’t really know what it is designed for :slight_smile: so give Nifty a try, it isn’t that hard to start with and given some time it can produce really good UIs. Search these forums for Pirate Hell v2 or Mythruna to see some good examples.

1 Like
@jmaasing said:
Nifty is designed for games, JavaFX... well I don't really know what it is designed for :) so give Nifty a try, it isn't that hard to start with and given some time it can produce really good UIs. Search these forums for Pirate Hell v2 or Mythruna to see some good examples.


Nifty was re-purposed for JME... as far as I can tell, it was designed for doing powerpoint type presentation via Java using OpenGL to render. Just sayin' ;)
@t0neg0d said:
Nifty was re-purposed for JME... as far as I can tell, it was designed for doing powerpoint type presentation via Java using OpenGL to render. Just sayin' ;)

90% of all game GUIs could easily be done in Nifty with the default controls. Calling JavaFX more of a GUI lib in comparison is ridiculous, its a timer system with some painting tools after the language around it was removed. You could just as well use raw Nodes and Geometries in your UI, that'd make more sense than JavaFX.
@t0neg0d said:
Nifty was re-purposed for JME... as far as I can tell, it was designed for doing powerpoint type presentation via Java using OpenGL to render. Just sayin' ;)

Yeah I might have been a little to quick to say what is what so I stand corrected, but anyway, I like Nifty and it is worth a try I think. Especially since it already works in jME :)
@jmaasing said:
Yeah I might have been a little to quick to say what is what so I stand corrected, but anyway, I like Nifty and it is worth a try I think. Especially since it already works in jME :)

I think @t0neg0d is joking here, the old "nifty is but a slideshow" one.

Nifty works well. It has its quirks but they are all manageable and the end results can be pretty slick.

@normen said:
I think @t0neg0d is joking here, the old "nifty is but a slideshow" one.

You old timers, always with the jokes :)

I was kidding… Nifty rocks. Now more than ever!

Hi all,



at first: Nifty is realy cool.



at second: But what if I want to use JavaFX for a Menubar in a program where JME runs on a canvas?

My problem is, if I run the program on my “relativ fast” pc it’s all ok, but if I run the program on an older pc and open a MenuItem, the PopupMenu is flickering and overriding of the canvas.



I hope anybody can understand what I’m trying to explain has an idea to solve this.

Maybe this helps:

Yes, that is the solution for “normal” Java but JavaFX doesn’t have this methods.

You can use AWT panels instead of canvas. See TestAwtPanels.