我的想法是在你调用JDialog的Frame上面添加一个
WindowListener监听
 void windowActivated(WindowEvent e)
这个事件,然后调用JDialog的toFront方法或者requestFocus方法
你试试看