adenau
December 11, 2008, 5:01am
1
Simple question which I hope has simple answer. If I create a non-fullscreen JMonkey window
display.createWindow( 640, 480, properties.getDepth(), properties.getFreq(), false );
Is there anyway I can access the underlying window (the JFrame). I'd like to move the window slightly to the left automatically.
Thanks,
Alex
adenau
December 11, 2008, 5:09am
2
This is such a hack, which is probably why I like it so much Anyways, if you are using LWJGL, you can use the LWJGL command directly.
Display.setLocation(0, 0);
My question would probably be then, is there a more JMonkey/clean way of doing this?
Thanks
adenau
December 11, 2008, 5:22am
3
Well, its a hack, so it had to have a problem. If I use the LWJGL Display.setLocation, I can only use it after I call createWindow, but before the window is actually initialize. Otherwise, everything hangs. Oh well …
Just means I need a better long term solution
basixs
December 11, 2008, 7:54am
4
DisplaySystem.getDisplaySystem().moveWindowTo( x, y );
works fine here...
basixs
December 11, 2008, 7:49am
5
Container dialog = KeyboardFocusManager.getCurrentKeyboardFocusManager().getCurrentFocusCycleRoot();
Should give you the frame (or at least the gfx panel, which you could in turn use to find the frame its on...)
Although I am wondering why it hangs...
LWJGL creates a native window on linux & win32 so you can't find it with the focus manager thing. Using
DisplaySystem.getDisplaySystem().moveWindowTo( x, y );
should work fine as long as you call it after the display is created.
basixs
December 11, 2008, 4:41pm
7
LWJGL creates a native window on linux & win32
I guess that explains why it works on mac