title: Customize the stroke of a JavaFX polyline
body: <p>I have a shape that I would like to render as a JavaFX <code>Polyline</code>, but with multiple colours in the stroke. Essentially, it would be an 8-pixel wide blue line with a 2-pixel wide black border on either side of it. I can achieve the same effect by creating a <code>Group</code>, and then adding two <code>Polylines</code> into the <code>Group</code>:</p>
  
  <pre><code>Group group = new Group();
  double[] coords = ...
  
  Polyline bg = new Polyline(coords);
  bg.setStroke(Color.BLACK);
  bg.setStrokeWidth(12);
  
  Polyline fg = new Polyline(coords);
  fg.setStroke(Color.BLUE);
  fg.setStrokeWidth(8);
  
  group.getChildren().add(bg);
  group.getChildren().add(fg);
  </code></pre>
  
  <p>So, while that renders the way I want, I now have a <code>Group</code> rather than a <code>Polyline</code>, so I can't treat it as a <code>Shape</code>. I can't see any way to specify a custom drawing mechanism, so is there a way to do this?</p>