ControlFx の Popover を使用して検証メッセージを表示しています。希望の高さ、幅、スタイルをポップオーバーに設定できません。以下は私が使用しているコードです。
PopOver popOver = new PopOver();
Label messageLable = new Label();
messageLable.setFont(Font.font(12));
messageLable.setMinHeight(15);
messageLable.setMaxHeight(15);
messageLable.setMinWidth(40);
messageLable.setText("Appropriate validation message ");
popOver.setContentNode(messageLable);
popOver.arrowSizeProperty().bind(new SimpleDoubleProperty(12));
popOver.arrowIndentProperty().bind(new SimpleDoubleProperty(12));
popOver.arrowLocationProperty().bind(new SimpleObjectProperty<>(ArrowLocation.LEFT_TOP));
popOver.cornerRadiusProperty().bind(new SimpleDoubleProperty(5));
popOver.hide(Duration.seconds(4));
popOver.setDetachable(Boolean.FALSE);
popOver.setStyle("-fx-background-color: rgb(255,0,255);");
編集1:
CSS からスタイル (背景色など) を設定できます。Styling JavaFX Popoverの回答を参照してください。しかし、私はまだ希望の高さと幅を設定することができません