title: Bring all Stages to the front
body: <p>In my application, I have several independent (non modal) Stages.</p>
  
  <p>I would like the following behaviour:</p>
  
  <ul>
  <li>when the main Stage is minimised, all other Stages should be minimised</li>
  <li>when the main Stage is un-minimised, all other Stages should be un-minimised</li>
  <li>when any of the Stages is selected, if some other Stages are not visible (hidden behind other applications for example), they should be brought to the front</li>
  </ul>
  
  <p>The first two requirements are easy (unless I missed something), something like:</p>
  
  <pre><code>mainStage.iconifiedProperty().addListener((observable, oldValue, newValue) -&gt; {
      if (newValue != null &amp;&amp; newValue != oldValue) {
          for (Stage s : otherStages) { s.setIconified(newValue); }
      }
  });
  </code></pre>
  
  <p>However I'm stuck on the third one. I have tried using the <code>focusedProperty</code> but it does not work (if I click on a menu in one of the stages, for example, because it first brings the other stages to the front, it loses focus and the menu does not open)...</p>
  
  <pre><code>//do this for each stage
  stage.focusedProperty().addListener((observable, oldValue, newValue) -&gt; {
      if (Boolean.TRUE.equals(newValue) &amp;&amp; newValue != oldValue) {
          for (Stage s : otherStages) {
              s.setIconified(false);
              s.toFront();
          }
          //request the focus back, but that creates issues
          stage.requestFocus();
      }
  });
  </code></pre>
  
  <p>Any ideas on how to implement the third requirement?</p>