title: JavaFx: Same Label in two(or more) places in the same view
body: <p>I don't know if I miss something, but I cannot manage to achieve that, I have the same label twice or more on the same view. I don't really want to duplicate it just use the same label with the same text/tooltip/style. </p>
  
  <p>A simple example:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;?import javafx.scene.layout.AnchorPane?&gt;
  &lt;?import javafx.scene.control.Label?&gt;
  &lt;AnchorPane xmlns="http://javafx.com/javafx"
              xmlns:fx="http://javafx.com/fxml"
              fx:controller="stackoverflow.dummy.Controller"&gt;
          &lt;Label fx:id="myLabel"/&gt;
          &lt;!--&lt;Label fx:id="myLabel"/&gt;--&gt;  ofc this doesn't work.
          &lt;!--&lt;Label fx:id="myLabel"/&gt;--&gt;
  &lt;/AnchorPane&gt;
  </code></pre>
  
  <p>If I try with <code>&lt;fx:reference&gt;</code> it appears only once, if I try with <code>&lt;fx:copy&gt;</code> it says I need a copy constructor, so I think I simply miss some easy solution. It should exist.</p>
  
  <p>Note:
  I don't really want want to duplicate the code like: myLabel1, myLabel2, ..., since all of them are having the same text/tooltip/style.</p>
  
  <p>I also know I can create a separate <code>.fxml</code> file where I build the label and use it via <code>&lt;fx:include&gt;</code> but I would prefer solving it in the same <code>.fxml</code> since it is a really simple thing I think it doesn't worth creating a new <code>.fxml</code> only for this.</p>