title: Centering an image in an ImageView
body: <p>I am currently trying to center an image in an ImageView using JavaFX. </p>
  
  <p>So I load the image in the view : </p>
  
  <pre class="lang-java prettyprint-override"><code>Image img = new Image("...");
  imageView.setImage(img);
  </code></pre>
  
  <p>and let's suppose the image is huge (2000x3000) and not the ImageView (400x100)</p>
  
  <p>The rendered image will be aligned on the left, and I would like to put in the center of the ImageView : </p>
  
  <p><a href="https://i.stack.imgur.com/nKIWz.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/nKIWz.jpg" alt="enter image description here"></a></p>
  
  <p>Is there anyway to perform that ? </p>