title: JavaFX coordinates inverted on the Y-axis with respect to Swing
body: <p><a href="https://stackoverflow.com/q/38362498/230513">Previously</a>, I asked a question comparing the SceneBuilder coordinates with JavaFX's output. I have come to realize that the problem did not lie within SceneBuilder and the exported FXML code; but it is, in fact, a problem with my machine's version of JavaFX. However, I'm still unclear as to why this happens.</p>
  
  <p>In my FXML code, I have the following hierarchy:</p>
  
  <pre><code>&lt;AnchorPane id="rootPane" pickOnBounds="false" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1"&gt;
     &lt;StackPane id="game"&gt;
        &lt;AnchorPane id="hud" style="-fx-background-color: rgba(0, 0, 0, 0);"&gt;
           &lt;Text id="ammo" fontSmoothingType="LCD" layoutX="14.0" layoutY="699.0" strokeType="OUTSIDE" strokeWidth="0.0" text="0" wrappingWidth="111.21875"&gt;
              &lt;font&gt;
                 &lt;Font name="Brother Deluxe 1350 Font" size="48.0" /&gt;
              &lt;/font&gt;
              &lt;effect&gt;
                 &lt;DropShadow color="#0000007a" height="16.0" offsetY="1.0" radius="5.5" width="8.0" /&gt;
              &lt;/effect&gt;
           &lt;/Text&gt;
        &lt;/AnchorPane&gt;
     &lt;/StackPane&gt;
  &lt;/AnchorPane&gt;
  </code></pre>
  
  <p>This produces the following output from IntelliJ:
  <a href="https://i.stack.imgur.com/wS8bt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wS8bt.jpg" alt="Java export with inverted Y coordinates"></a></p>
  
  <p>As you can see, the Y coordinates are flipped, with 0,0 being in the bottom left of the screen. But in SceneBuilder, the output is what I would normally expect:
  <a href="https://i.stack.imgur.com/UImMj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UImMj.jpg" alt="SceneBuilder preview with proper Y coordinates"></a></p>
  
  <p>If necessary, the full code can be found <a href="https://github.com/officialexosoft/Zerfall-Java/tree/JavaFX/src/exosoft/zerfall" rel="nofollow noreferrer">here</a>.</p>
  
  <p>My question is, why is my JavaFX application producing an interface with 0,0 being at the bottom left instead of the top left, as my research indicates it should be? And if possible, how can I fix this problem?</p>
  
  <p>My operating system is OS X 10.12, El Capitan. My JDK version is 1.8.0_66.</p>