我能改变两个JDialog之间的焦点吗?

时间:2018-02-27 11:26:23

标签: java swing

因此。我有一个MainScreen从我的MainScreen扩展javax.swing.JFrame我打开一个 的JDialog

Logout logout = new Logout(this,true,utilajx,user1);
 logout.setVisible(true);

然后从我的JDialog开始,我将打开另一个JDialog,我想把焦点放在它上面。:

dlg = new DialogVirtualKeyboardReal(mainScreen, false, codArticol);
       dlg.setLocaleL(Locale.ENGLISH);

this is how it looks like, I want to make my keyboard in focus but i can't

1 个答案:

答案 0 :(得分:0)

如果我将模态参数更改为true,它将按照我想要的方式工作。谢谢-1。

  lg = new DialogVirtualKeyboardReal(mainScreen, true, codArticol);
           dlg.setLocaleL(Locale.ENGLISH);

And here it is what I wanted