how to center a label on a pane in javafx
<p>I'd like to set results to the centre of <code>Pane</code>.</p>

<pre><code>Label results = new Label("You win");
Pane pane = new Pane();
pane.getChildren().add(results);
</code></pre>

<p>I've tried both lines of code below and neither works.</p>

<pre><code>results.setAlignment(Pos.CENTER);
results.setContentDisplay(ContentDisplay.CENTER);
</code></pre>

<p>Btw, I know how to get this centered with <code>StackPane</code> and <code>GridPane</code> but in this case I need to use a plain <code>Pane</code>.</p>