Reputation: 93
In javafx 2.0 it is possible to create the layout by using FXML approach or by using normal java code. What is the best way with respect to a well designed set of UIs. In my application there is about 100 sub UIs.
Thanks
Upvotes: 9
Views: 9186
Reputation: 1365
Scene builder should be a good starting point to create unique UIs of your application. Considering you have 100s of UIs, I assume that some of their "appearances" should be identical with slightly different functions. You can load the FXML dynamically and assign controller at run time. Which means 1 FXML file can be used with multiple controllers. Which can save you some time while keeping the code dynamic for easier maintenance.
FXMLLoader loader = new FXMLLoader(getClass().getResource("DBedit.fxml"));
loader.setController(new DBeditEntityUser());
So, to make use of the same FXML with a different controller.
FXMLLoader loader = new FXMLLoader(getClass().getResource("DBedit.fxml"));
loader.setController(new DBeditEntityUserLevel());
Hope this helps.
Upvotes: 1
Reputation: 414
FXForm2 is a library providing automatic JavaFX 2.0 form generation.
however FXForm2 is not full WYSIWYG GUI design tool.
http://dooapp.github.io/FXForm2/
Upvotes: 1
Reputation: 34478
FXML looks more logical for that purpose. By using FXML
Upvotes: 7
Reputation: 13131
fyi,
road map for Java fx http://javafx.com/roadmap/ shows that the scene builder will be released around middle of the year. From the above web page:
"JavaFX Scene Builder is a WYSIWYG GUI design tool for the JavaFX platform. It enables designing user interface screens by simply dragging and positioning GUI components from a palette onto a scene.
The tool generates files in FXML format2 that can be used within a project in any IDE such as NetBeans or Eclipse. The JavaFX Scene Builder can be used to create GUI for desktop applications and applets that run in a browser."
Upvotes: 0