CustomMenuItem customMenuItem = new CustomMenuItem();
settings.getItems().add(customMenuItem);
customMenuItem.getStyleClass().setAll("noSelectAnimationMenueItem","menu-item");
HBox hbox = new HBox(3);
hbox.setAlignment(Pos.CENTER_LEFT);
hbox.getChildren().add(new Label("Refresh Interval"));
TextField interval = new NumberOnlyTextField();
interval.setPrefWidth(100);
interval.textProperty().bindBidirectional(refreshRateInMs);
hbox.getChildren().add(interval);
hbox.getChildren().add(new Label("ms"));
customMenuItem.setContent(hbox);
buttonsPane.getChildren().add(settings);
refreshButton.disableProperty().bind(toggleButton.selectedProperty());