Printing a node in JavaFX
<p>So I have a simple tab which contains few grid panes. After u chose a name from a ListView, data from database is displayed on the right side( check the link of my gui ). There is a button with a text "Stampaj" on it, in english  "Print". When it's pressed it prints the right side of the tab (grid pane with data). My program is printing what i want but it does not print it propertly( check the link after printing). </p>

<p>Link of my gui (tab): <a href="https://postimg.org/image/bmtwbhxv5/" rel="nofollow">https://postimg.org/image/bmtwbhxv5/</a></p>

<p>Link of data after printing( in pdf): <a href="https://postimg.org/image/elp9ugvlt/" rel="nofollow">https://postimg.org/image/elp9ugvlt/</a></p>

<p>Code of the method I print my node with:</p>

<pre><code>public void print(final Node node) {
    PrinterJob job = PrinterJob.createPrinterJob();
    Printer printer = Printer.getDefaultPrinter().getDefaultPrinter();
    PageLayout pageLayout =
        printer.createPageLayout(Paper.A4, PageOrientation.PORTRAIT, Printer.MarginType.EQUAL);
    JobSettings jobSettings = job.getJobSettings();
    jobSettings.setPageLayout(pageLayout);
    boolean printed = job.printPage(node);
    if (printed) {
        job.endJob();
    }
}
</code></pre>

<p>Now when I call this method, the argument I forward is GridPane which contains Labels and other components that are relavent to that data showing ( right side of GUI ). I've tryed to switch places with those GridPanes I have at my current tab and then it prints propertly ( from the start of the page ). I know why is he printing like this but I'm wondering is there a way to move that text to the start of the page and print it normaly without switching places and leaving my GUI the way it is?</p>