Choosing a GUI

Hi, which GUI should I use?
TWL,Nifty or FengGUI?

I am using plain LWJGL 2.8.1, with Slick util, but DO NOT want to use the rest of the slick library, and I can’t seem to get either TWL or Nifty working properly, and FengGUI seems out of date.

Nifty: LwjglInitHelper not resolved, + How can I use a OpenAL soundsystem?
TWL:

java.lang.SecurityException: sealing violation: can't seal package de.matthiasmann.twl.utils: already loaded
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$000(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at de.matthiasmann.twl.renderer.lwjgl.LWJGLRenderer.<init>(LWJGLRenderer.java:116)
	at Game.LoadGUI(Game.java:63)
	at Main.Create(Main.java:49)
	at WindowMain.<init>(WindowMain.java:32)
	at WindowMain.main(WindowMain.java:52)

Thanks,
roland

Have you tried scene2d.ui in libgdx?
http://code.google.com/p/libgdx/
Here are some docs for the 2D scene graph. The UI package is not yet documented, though it has javadocs and TableLayout has some docs.
http://code.google.com/p/libgdx/wiki/scene2d
http://code.google.com/p/table-layout/
I should also mention that scene2d has seen a bit of development the past few months. Refactoring is sometimes done that breaks existing code. It usually isn’t too hard to fix up.

There is also support for TWL in libgdx.

Thanks for the reply, Nate.
I already have my game working and don’t want to have to put in a whole new game development library when all I want is a GUI.
Is there another way to fix this?
Thanks again,
roland

Sure… separate your model from your view and then switching UI libraries won’t be much work at all. 8)

Hi

TWL is nice, NiftyGUI is very flexible but it is quite memory intensive (I used it during several months, I profiled its source code), FengGUI does less things but is more reliable. Maybe have a look at Resistance Force, this game uses a GUI based on PureSwing and relying heavily on shaders with LWJGL.

Thanks for the replies everyone.
I really want to get TWL to work.

I found out that my problem was caused by loading Icons with PNGDecoder.
Does anyone know why this could be?

EDIT: figured it out, I was loading PNGDecoder.jar when TWL loads it aswell, so I removed PNGDecoder.jar.

Hopefully TWL goes well :slight_smile:

I find Nifty and especially TWL to be convoluted and complicated.
So since we got to rewrite your map editor in opengl, I just wrote my own gui with only the elements I need.
Was eventually way more easy that to understand someone else’s mess.

Who’s map editor??
Edit: you mean Map Editor 3? It looks good :slight_smile: nice work

Well actually that the old AWT/Swing one
ironically the last post on our page

Our game just got so much better and complex, that we had to do a real good opengl editor
still in development, but looks kinda like this

http://img854.imageshack.us/img854/9662/alka1.png
http://img155.imageshack.us/img155/9186/alka2.jpg
http://img853.imageshack.us/img853/2388/alka3.jpg
http://img190.imageshack.us/img190/813/alka4.jpg

also finally gave it a name.

Still brand new and what I am currently working on - while the others go on with the game.
Programming an application vs. programming a game - not that fun ;D

haha I know what you mean ;D I’d much rather be doing gameplay than GUI at the moment!
The screenshots look good though :slight_smile:

for TWL, please ask on Slick forum: http://slick.javaunlimited.net/viewforum.php?f=18