Focus problem

Hey

As yo u may know i am working on a conversing of ttd but i am having thefollowing problem
When i let the user choose its resolution (by using a jdialog) before launching the game my jframe
doenst gain the focus when opening.
When i start my app without the jdialog first aeverything goes fine but when i use the jdialog before creating
the jframe it doens obtain the focus. Any ideas how this comes and to solve it?

thx

requestFocus()

tried it but didnt help (i dont have to it when just using jframe)
even tried requestFocusInWindow

setFocusable(true); ?

whats the JDialog’s owner?

this is one of the few uses where one should use requestFocus() over requestFocusInWindow(), make sure that setVisible(true); is called,and executed before the requestFocus();

the jdialog has no owner because its just appearing before the actual launch of the game. So no jframe has been created yet

I think the only way to overcome this problem is by creating the frame first, show it with a placeholder panel inside, display the dialog with this frame as the owner and modify the existing frame after the dialog exits.

if requestFocus on the window doesnt work, try it on the window’s content pane.