我试图从 ColorPicker 中获取“新颜色”值(我的图像中为“nouvelle couleur”,因为它是法国的)。

colorPicker.setOnAction((ActionEvent e) -> {
text.setFill(colorPicker.getValue());
});
Run Code Online (Sandbox Code Playgroud)
当您为 ColorPicker 设置 EventHandler 时,它仅在您关闭 ColorPicker 时返回 ColorPicker 的值。
所以我想知道,是否有可能获得这个值?
抱歉,如果有任何错误,英语不是我的母语。