GUI/HUD programming jME3

Hey guys!

I’m looking for a tutorial or help for programming an HUD in jME3. I tried Nifty 1.2 and other solutions coded for jME2, but I failed!

Is there a good solution for HUD implementation in jME3? A tutorial or sample would be very helpful! Sry for my bad english!

I hope you can help me!



I don’t understand your problem. Nifty is the default GUI library for jME3, and it’s properly documented in our wiki:

If you don’t like Nifty then you’ll be better off integrating a different GUI library or making one of your own. Nifty is however the only one we can currently provide active support for.

First, thanks for the quick help! The entry in the documentation I’ve read in detail. GUI programming is not the problem, but the in-game HUD. I want a “frame” around the viewport. In this “frame” should be displayed values, such as HP, or level.

I could make a sketch, if it would be helpful.

Thank you!

Best wishes,


I haven’t used Nifty yet, but for most GUIs it should be able to be used as a HUD as well. Just don’t set a background image in your main frame and you should see your scene underneath it. This should give you a HUD effect.

But also massive clipping errors…

What sort of clipping errors are you getting?

I’ve not yet tried Nifty for HUD rendering together with JME3 but Nifty IS meant to be used for HUD rendering too! If you don’t use a solid color for the backgroundColor or you use a transparent one you should be able to render Nifty on top of your game.

I’ve blogged about using Nifty on top of Slick2d for some HUD kinda purpose before. It shows how you can change elements from within Nifty and there is a webstart demo available. Only for Slick2d overlay rendering and not JME3 (yet).

PS: Creating a Nifty HUD Demo for some JME3 demo is still on my wishlist to do someday :smiley: