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

前端 未结 3 1776
遇见更好的自我
遇见更好的自我 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:17

    Try to add a FocusListener and listen for focus gained event where you can call yourWindow.toFront(). setAllwaysOnTop() could be interesting for you too.

提交回复
热议问题