title: JavaFX DPI awarness
body: <p>Good night, I'm making an application using javaFx with some partners; the idea is that it's going to be used in Windows and Linux. We've been doing some testing and seen that the application displays different in both OS.</p>
  
  <p>We are using Scene Builder.I'm wondering if someone happend to come across a similar problem and how you solve it(I've already read other similar post but none of them helped me).</p>
  
  <p>This is how it displays on Windows:
  <a href="https://i.stack.imgur.com/SRPhE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SRPhE.png" alt="enter image description here"></a></p>
  
  <p>And this is how it displays on Linux:
  <a href="https://i.stack.imgur.com/lxWTO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lxWTO.png" alt="enter image description here"></a></p>
  
  <p>This is just one example as it happens with all forms. If there's someone out there that could help, we would really appreciate it!!</p>
  
  <p>I made the next function to call the forms:</p>
  
  <pre><code>private void OpenForm(String form, String title) {
      try
      {
          FXMLLoader fxmlLoader1 = new FXMLLoader(getClass().getResource(form));
          Parent root;
          root = fxmlLoader1.load();
          Stage stage = new Stage();
          stage.setScene(new Scene(root));
          stage.setTitle(title);
          stage.setResizable(false);
          stage.show();
  
      }catch (Exception ex)
      {
          Msg(3,"Program error","It appears there's something wrong : ",ex.getMessage().toString());
          System.out.println(ex);
      }
  }
  </code></pre>
  
  <p>Here's the FXML of the form as requested:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;?import javafx.scene.control.Button?&gt;
      &lt;?import javafx.scene.control.TableColumn?&gt;
      &lt;?import javafx.scene.control.TableView?&gt;
      &lt;?import javafx.scene.layout.AnchorPane?&gt;
  
      &lt;AnchorPane prefHeight="346.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.65" xmlns:fx="http://javafx.com/fxml/1" fx:controller="GUI.Almacen.ClientesMod"&gt;
         &lt;children&gt;
         &lt;TableView fx:id="tvClientes" layoutX="4.0" layoutY="6.0" prefHeight="310.0" prefWidth="638.0"&gt;
         &lt;columns&gt;
          &lt;TableColumn fx:id="tcIdCliente" prefWidth="75.0" text="RacF de Cliente" /&gt;
        &lt;TableColumn fx:id="tcNombre" prefWidth="75.0" text="Nombre" /&gt;
        &lt;TableColumn fx:id="tcDivision" prefWidth="75.0" text="División" /&gt;
      &lt;/columns&gt;
       &lt;columnResizePolicy&gt;
          &lt;TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /&gt;
       &lt;/columnResizePolicy&gt;
    &lt;/TableView&gt;
    &lt;Button fx:id="btnModificar" disable="true" layoutX="535.0" layoutY="320.0" mnemonicParsing="false" onAction="#abrirModificarCliente" text="Modificar Cliente" /&gt;
    &lt;Button fx:id="btnAgregar" layoutX="432.0" layoutY="320.0" mnemonicParsing="false" onAction="#abrirAgregarCliente" text="Agregar Cliente" /&gt;
      &lt;/children&gt;
      &lt;/AnchorPane&gt;
  </code></pre>