Java onToped JFrame打开JDialog=未在JFrame上onToped的对话框

Java onToped JFrame打开JDialog=未在JFrame上onToped的对话框,java,swing,jframe,jdialog,Java,Swing,Jframe,Jdialog,好吧,如果我们已经点击了JFrame this.setAlwaysOnTop(true); 然后打开JDialog private void colorChooseMenuItemActionPerformed(java.awt.event.ActionEvent evt) { ColorDialog fc = new ColorDialog(); fc.setLocatio

好吧,如果我们已经点击了
JFrame

this.setAlwaysOnTop(true);
然后打开
JDialog

private void colorChooseMenuItemActionPerformed(java.awt.event.ActionEvent evt) {                                                    
    ColorDialog fc = new ColorDialog();
    fc.setLocationRelativeTo(this);
    fc.setModal(true);
    fc.setVisible(true);
} 
在这种情况下,
JDialog
将位于
JFrame
下。当我单击框时,对话框移到顶部。如果我关闭对话框(关闭时释放)并再次打开,它将正常工作并显示在
JFrame


发生了什么事?

ColorDialog应该将jFrame作为父对象