id
you use to set a CSS ID to your Component, for example <Text id="welcome-text" .../>
and in your stylesheet you have something like #welcome-text { font-size: 16pt; }
so this will be applied to your Text
.
fx:id
you use if you want to work with your Components in your Controller class, where you annotate them with @FXML Text myWelcomeText
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…