r/JavaFX • u/Draaksward_89 • Jan 16 '25
Help Grouping @JXML into an entity
Is it possible to combine several
```
\@FXML private TextField myField
```
into a separate class, which then would be used in a `\@FxmlView`?
1
Upvotes
View all comments
Show parent comment
1
u/Draaksward_89 Jan 16 '25
Yeah, sorry, still getting into JavaFX.
I'm going by the approach, found in quite a few tutorials for JavaFX+Spring Boot, which is .fxml and a java controller, targeted at that fxml.
That approach states to link the fxml(fx:id) field to a controller class in such a manner:
I'm writing a UI, which has tabs, consisting of several input fields.
And my question is, can I somehow make a
\@FXMLsomething private MyTab1 myTabwhich will contain the fields, mentioned earlier, making the controller class look a bit cleaner (just like making a composite key in spring jpa).