What is the best way to design the GUI in javafx 2.0?

Sachin Perera picture Sachin Perera · Dec 22, 2011 · Viewed 8.1k times · Source

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

Answer

Sergey Grinev picture Sergey Grinev · Dec 22, 2011

FXML looks more logical for that purpose. By using FXML

  • you split business logic from view
  • you get option to edit design without recompiling project.
  • you get design as structured xml tree which is much easier to edit comparing to potentially randomly ordered java code
  • with SceneBuider tool you get an option to use visual editor for your fxml files