JavaFX 2.2 Stage always on top

后端 未结 4 1793
Happy的楠姐
Happy的楠姐 2020-12-06 01:19

I have a normal JFrame (one part of the app) and a second JavaFX window (I can\'t use a JFrame for the JavaFX stage). The problem is that the JavaFX window should always be

4条回答
  •  死守一世寂寞
    2020-12-06 01:35

    I have a similar problem right now.

    I use this line of code to get an always on top effect:

    stage.initModality(Modality.APPLICATION_MODAL);
    

    It works fine for me.

    Here is the doc.

提交回复
热议问题