JavaFX: can you create a stage that doesn't show on the task bar and is undecorated?

前端 未结 6 818
予麋鹿
予麋鹿 2020-12-15 21:55

I\'m trying to create a stage that doesn\'t appear on the Windows task bar and is undecorated (no borders and no close/minimize/maximize buttons). My end goal is to create a

6条回答
  •  我在风中等你
    2020-12-15 22:39

    As far as I know, JavaFX and Swing are interoperable and swing supports this feature. So if you can use Swing, integrate something like this into your application:

    class MyFrame extends JFrame {
    
        // ...    
    
        MyFrame() {
            setUndecorated(true);
            setType(Type.UTILITY);
        }
    
        // ...
    }
    

    I haven't tried this but other SO questions like this will probably help you on how to use Swing in JavaFX.

提交回复
热议问题