Dialog beside jME Display

I want to show a dialog beside the jME display.

Using null as owner param for Swing dialogs will show the dialog in the

center of the screen (behind jME display).



Is there a way to put the dialog besides the display?

Maybe by using the jME window as param for Swing dialogs instead of null?

By default, I thought swing dialogs started in the upper left of the screen, not the middle. Are you sure your not centering it?

I'm sure:


...If you specify null, then the look and feel will pick an appropriate position for the dialog — generally the center of the screen — and the Dialog will not necessarily follow the focus behavior of any visible Frame or Dialog.

http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html#create

But look & feel doesn't provide a necessary property to change.

So I think I really have to make my own dialog (needs to be modal). Like in this example (and use a simple setLocation call):
http://www.rgagnon.com/javadetails/java-0582.html

I think I'll try this and report. Thanks for reply!

Simply set the location of the dialog if you know where it is beside the window. The only problem is, that your dialog can get behind the lwjgl window. If you could specify it as parent that would not happen (but you can't).

You may want to consider using jME in a Canvas.  Then you can control / size / position it in ways you are already familiar with in Swing.

Out of curiousity is the Canvas implementation using an AWT Canvas or a Swing jPanel??



I have been noticing some things that make me think its still using a AWT canvas,  I think as of java 1.6 swing jPanels now support direct openGL rendering.

jME is using AWT Canvas because LWJGL does so.