title: How to change TextArea background color more than once?
body: <p>I have a <code>TextArea</code> in my JavaFX program that I want to be able to allow the user to set the background color of. I was able to figure out how to change the background color using an external <code>css</code> file by doing this.</p>
  
  <pre><code>.text-area .content {
   -fx-background-color: blue ;
  }
  </code></pre>
  
  <p>However, this would only allow me to have a default setting and the user would not be able to select a color from a menu to change it.</p>
  
  <p>I also tried doing this in Java code.</p>
  
  <pre><code>textArea.setStyle("-fx-background-color: green");
  </code></pre>
  
  <p>But it doesn't change anything because the <code>TextArea</code> has more depth to it.</p>
  
  <p>Is there any way I can change the background multiple times without having to modify the <code>css</code> file?</p>