title: Highlighting text in JavaFx Label
body: <p>I am trying to set the text background of the JavaFx label text as green using the following CSS</p>
  
  <pre><code>label.setStyle("-fx-background-color:rgba(85, 255, 68,0.7););
  </code></pre>
  
  <p>And the unhighlight using the following </p>
  
  <pre><code>label.setStyle("-fx-background-color:rgba(0,0,255,0);");
  </code></pre>
  
  <p>However these does not work most of the times when it has to be done back to back.</p>
  
  <p>Is there any way to set the style without using CSS i.e. using JavaFx API itself. I found label.textFill(Paint p) for text color but nothing for background colour i.e. the color of the label itself.</p>