As you can see, the first text field (username) is selected, and this happens all the times I open the app. This is not good, because I want the person who opens the app to actually see "username" text field, and then let him click and then write.
How to do that with Scenebuilder? or maybe via java code?
This is the fxml:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<VBox prefHeight="400.0" prefWidth="640.0" xmlns="http://javafx.com/javafx/18" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.vipagepharma.farmacia.autenticazione.login.SchermataLogin">
<children>
<AnchorPane maxHeight="-1.0" maxWidth="-1.0" prefHeight="467.0" prefWidth="711.0" VBox.vgrow="ALWAYS">
<children>
<ImageView fitHeight="121.0" fitWidth="122.0" layoutX="30.0" layoutY="-12.0">
<image>
<Image url="@../../../22b6dd45a8834880a7e4b3e0d2d6645e-removebg-preview.png" />
</image>
</ImageView>
<TextField id="IdTextField" fx:id="username" layoutX="249.0" layoutY="125.0" promptText="ID" style="-fx-background-radius: 5; -fx-border-radius: 5;" AnchorPane.leftAnchor="249.0" AnchorPane.rightAnchor="227.0">
<font>
<Font name="Arial" size="15.0" />
</font></TextField>
<TextField fx:id="password" layoutX="249.0" layoutY="161.0" promptText="Password" style="-fx-background-radius: 5; -fx-border-radius: 5;" AnchorPane.leftAnchor="249.0" AnchorPane.rightAnchor="227.0">
<font>
<Font name="Arial" size="15.0" />
</font></TextField>
<Button fx:id="login" alignment="CENTER" layoutX="279.0" layoutY="200.0" mnemonicParsing="false" onMouseClicked="#onLoginClicked" prefHeight="27.0" prefWidth="105.0" style="-fx-background-color: #CFF3F2 #CFF3F2; -fx-border-color: #b9b9b9; -fx-background-radius: 5; -fx-border-radius: 5;" text="Login" AnchorPane.leftAnchor="279.0" AnchorPane.rightAnchor="266.0">
<font>
<Font name="Arial" size="15.0" />
</font></Button>
<Button id="bottoneRegistrati" alignment="CENTER" layoutX="311.0" layoutY="313.0" mnemonicParsing="false" onMouseClicked="#onRegistrazioneClicked" prefHeight="25.0" prefWidth="95.0" style="-fx-background-radius: 5; -fx-border-radius: 5; -fx-background-color: cff3f2; -fx-border-color: b9b9b9;" text="Registrati" AnchorPane.leftAnchor="311.0" AnchorPane.rightAnchor="234.0">
<font>
<Font name="Arial" size="15.0" />
</font></Button>
<Text layoutX="127.0" layoutY="291.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Hai dimenticato la password?" AnchorPane.leftAnchor="127.0" AnchorPane.rightAnchor="354.06982421875">
<font>
<Font name="Arial" size="15.0" />
</font></Text>
<Button id="bottoneReimposta" alignment="CENTER" layoutX="339.0" layoutY="272.0" mnemonicParsing="false" style="-fx-background-radius: 5; -fx-border-radius: 5; -fx-background-color: cff3f2; -fx-border-color: b9b9b9;" text="Reimposta password" AnchorPane.leftAnchor="339.0" AnchorPane.rightAnchor="169.0">
<font>
<Font name="Arial" size="15.0" />
</font></Button>
<Text layoutX="162.0" layoutY="332.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Non sei registrato?" AnchorPane.leftAnchor="162.0" AnchorPane.rightAnchor="389.10400390625">
<font>
<Font name="Arial" size="15.0" />
</font></Text>
</children>
<VBox.margin>
<Insets />
</VBox.margin>
</AnchorPane>
</children>
</VBox>