如何改变Jfoeinx TextArea的字体颜色

时间:2016-12-02 16:21:30

标签: css javafx

我正在使用Jfoeinx TextArea,我想更改字体颜色(默认为白色) 我试过-fx-background-color但它没有用 日Thnx

AnchorPane root=new AnchorPane();
        JFXTextArea text =new JFXTextArea();
        root.getChildren().add(text);
        text.setStyle("-fx-background-color:#000000");
        primaryStage.setTitle("Hello World");
        primaryStage.setScene(new Scene(root, 500, 789));
         primaryStage.show();

1 个答案:

答案 0 :(得分:1)

尝试使用-fx-text-fill,因为这是您经常设置svg文字颜色的方式

相关问题