hello, I am working in a applet with jme 2 and fenggui. I had faced lot of issues, but thanks to the forums I had solved many of them. Right now, I have a very simple window, but it seems to be ignoring "set_title", "set_position", "set_size" and all the other setters. the window always appears in the lower left corner, with the title "no title". my code is:
m_GuiDisplay = new org.fenggui.Display(new org.fenggui.binding.render.lwjgl.AWTGLCanvasBinding(glCanvas));
m_GuiInput = new FengJMEInputHandler(m_GuiDisplay);
Window frame = new Window();
m_GuiDisplay.addWidget(frame);
frame.setMovable(true);
frame.setPosition(new Point(200, 200));
frame.setX(200);
frame.setY(200);
frame.setSize(400, 400);
frame.setLayoutManager(null);
frame.setTitle("Test Window");
frame.getAppearance().add(new PlainBackground(Color.GRAY));
frame.pack();
try{
XMLTheme.TYPE_REGISTRY.register("Texture", org.fenggui.binding.render.lwjgl.LWJGLTexture.class);
XMLTheme x = new XMLTheme("fengui/themes/QtCurve.xml");
x.setUp(frame);
}
catch(Exception e) {e.printStackTrace();}
m_GuiDisplay.layout();
any help will be appreciated!
use the Fenggui call for creating stuff.
depending on version
Fenggui.createWidget(Window.class)
or
Fenggui.createWindow(somewhat);
I changed the new Window() line with this one:
Window frame = FengGUI.createWidget(Window.class);
with no changes in the output
the window yet shows "No Title" in the title bar, and its position and size is not correct (low left corner)
what other thing I must check?
I am using a FengGui Jar that was posted to the forums, as compatible with jme 2.
thks!