JFrames and JDialogs sometimes open up behind their parent windows but have focus

前端 未结 3 1800
遇见更好的自我
遇见更好的自我 2021-01-19 03:45

We are developing a rather big Java enterprise application with a traditional Swing client.

Every now and then, we facing the problem that random JDialogs and JFra

3条回答
  •  日久生厌
    2021-01-19 04:08

    JFrames should not have "parents" as they are meant to be the "parent-most" window of an application. If you have a window that is meant to be a "child" and is therefore meant to be above another window, then it should be a dialog such as a JDialog or JOptionPane and should have its parent window set accordingly.

提交回复
热议问题