Javafx stage resizeable false and maximized true hides the taskbar

Viewed 3788

In my JavaFX FXML application when I set resizable to false and maximized to true the window becomes maximized but the taskbar gets hidden. I am using Netbeans 8.0.2 on Windows 7 64 Bit with JDK 1.8.60

In Netbeans I followed the steps to create a new JavaFX FXML application. To the default code generated I added the following two lines in the start function.

stage.setResizable(false);
stage.setMaximized(true);

Hence the final start function is as below

public void start(Stage stage) throws Exception {
    Parent root = FXMLLoader.load(getClass().
        getResource("FXMLDocument.fxml"));

    Scene scene = new Scene(root);

    stage.setScene(scene);
    stage.setResizable(false);
    stage.setMaximized(true);
    stage.show();
}

Now when I run the application the window is maximized, title bar is visible but the task bar is not visible. How should I fix this i.e. make the task bar visible?

2 Answers
Related