Textarea javaFx Color
<p>I'm trying to develop an app that looks like a terminal console, am using a TextArea for that and my wish is to habe a black background and green text,</p>
<p>The point I want to do this without using any ccs template</p>
<p>I know that my question can look like a duplicated in here:</p>
<p><a href="https://stackoverflow.com/questions/29745413/javafx-textarea-background-color-not-css">javafx textarea background color not css</a></p>
<p>or</p>
<p><a href="https://stackoverflow.com/questions/21493634/javafx-css-styling-of-textarea-does-not-work">JavaFX CSS styling of TextArea does not work</a></p>
<p>but after reading those and trying what they suggested I found no luck to solve my issue</p>
<p><strong>What I tried so far (Unsuccessfully):</strong></p>
<p>in the FXML:</p>
<pre><code>&lt;TextArea 
    fx:id=&quot;terminalTextArea&quot;
    layoutX=&quot;14.0&quot;
    layoutY=&quot;85.0&quot;
    prefHeight=&quot;64.0&quot;
    prefWidth=&quot;402.0&quot;
    style=&quot;-fx-font-family: Consolas; -fx-highlight-fill: #00ff00; -fx-highlight-text-fill: #000000; -fx-text-fill: #00ff00; -fx-background-color:#000000;&quot;
    text=&quot;Terminal&quot;
    AnchorPane.leftAnchor=&quot;10.0&quot;
    AnchorPane.rightAnchor=&quot;10.0&quot;&gt;
    &lt;font&gt;
        &lt;Font name=&quot;System Bold&quot; size=&quot;14.0&quot; /&gt;
    &lt;/font&gt;
&lt;/TextArea&gt;
</code></pre>
<p>and in the source-code:</p>
<pre><code>@Override
public void initialize(URL url, ResourceBundle rb) {
    System.out.println(&quot;init here&quot;);
    terminalTextArea.setStyle(&quot;-fx-text-fill: black;&quot;);
}
</code></pre>
<p>The only thing that I get is a bordered color like in the image below:</p>
<p><a href="https://i.stack.imgur.com/FIjFs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FIjFs.png" alt="enter image description here" /></a></p>