I can't get a JAVA FX "FXML" window to get on front of the OSX Dock on Yosemite 10.10.1.
I created a fresh "new JavaFX FXML-enabled application" on NetBeans which gives this code :
public class Test extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
stage.setAlwaysOnTop(true); // I ADDED THIS
}
public static void main(String[] args) {
launch(args);
}
}
I added setAlwaysOnTop()
on my stage, but still, my window is always hidden behind the dock.
Is there a way to set my window on front ?