ScriptKiddy ScriptKiddy - 6 months ago 93
Java Question

JavaFX Combining Utility and transparent stage style

I would like to have a JavaFX Application that doesn't appear in the taskbar and also does not have window decoration, how can i achieve that, any ideas?

EDIT:

I have tried this:

Is it possible to have a transparent utility stage in javafx?

It is working fine, but the graphics are pretty bad, so this is not a good way in my opinion.The bad graphics are caused byby the not working antialiasing inside of the JFXPanel.The JFXPanel seems to be bugged.

Answer

It is not possible to do that with JavaFX, but i found a workaround using Swing.Just create a JFrame and set its Type to Type.UTILITY and set Undercorated to true. Then create an JFXPanel embedding the FX Scene.

JFrame frame = new JFrame();
frame.setType( Type.UTILITY );
frame.setUndecorated( true );
final JFXPanel mainJFXPanel = new JFXPanel();
frame.getContentPane().add( mainJFXPanel );

mainJFXPanel.setScene( getScene() ); //The "getScene()" is just a placeholder
Comments