title: JavaFX 8: Handling maximize request before it's actually done
body: <p>I need to change effect of clicking maximize button of the stage, so it will be just put into another stage. But to achieve that, I need to handle maximize request before it's actually done. I tried this:</p>
  
  <pre><code>stage.maximizedProperty().addListener( (observable, oldValue, newValue) -&gt;
  {
      //. . .
  });
  </code></pre>
  
  <p>But it's invoked too late and the stage has been already maximized. Even if I hide it, there is an ugly view when window maximizes and then it quickly disappears. So is there any way to make it work properly?</p>