I have not been able to set the background color of a text area. Here is what I am trying and it works for other components.
****************************************************************
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.scene.control.TextArea;
public class TextAreaTest extends Application{
public void start(Stage stage){
TextArea area = new TextArea();
area.setStyle("-fx-background-color: black; -fx-text-fill: lightgreen;");
Scene s = new Scene(area);
stage.setTitle("black text area");
stage.setScene(s);
stage.show();
}
public static void main(String[] args){
launch(args);
}
}
***************************************************************
I am using jdk 8 with whichever javafx version is included. I searched quite a bit on the internet and I seem to see mixed results using this technique.
Thank you.