title: Lineargradient for Line in javafx
body: <p>How can I use lineargradient for <strong>Line</strong> in Javafx?<br>
  I tried this:  </p>
  
  <pre><code>LinearGradient lg = new LinearGradient(...);
  line.setFill(lg);  
  ....
  </code></pre>
  
  <p>It doesn't work.</p>