import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.CheckMenuItem;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.stage.Stage;

public class ScreenMenuBarCheckboxBugJavaFX extends Application {

    //start this class from terminal (when you start this class from IntelliJ, you will not run in this issue)
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage stage) throws Exception {
        MenuBar menuBar = new MenuBar();
        Menu menu = new Menu("Menu");
        //macOS BigSur 11.2.3 with os language to german, selection mark is missing
        CheckMenuItem checkMenuItem = new CheckMenuItem("CheckMenuItem");
        checkMenuItem.setSelected(true);
        menu.getItems().add(checkMenuItem);
        menuBar.getMenus().add(menu);
        menuBar.setUseSystemMenuBar(true);
        Scene scene = new Scene(menuBar, 200, 400);
        stage.setScene(scene);
        stage.show();
    }
} 