2 Replies Latest reply: Jan 23, 2013 3:52 AM by TAJDIN RSS

    When to use Scene Builder and when to write the UI code manually

    986307
      I'm planning my first bigger JavaFX GUI but I'm not quite sure whether to use Scene Builder / FXML or not.

      Do you have any opinions when to use Scene Builder and when to write the UI code manually?

      First thing that came to my mind is dynamic UIs where number and type of fields are known only at runtime.
      This is probably impossible in FXML approach if you don't generate FXML at runtime.

      What about reusable UI components? Is it easy to make reusable UI components when using FXML?
        • 1. Re: When to use Scene Builder and when to write the UI code manually
          TAJDIN
          dear

          scene builder is used for total UI and manually code is not necessary.
          it generate fxml code which is very complecated to understand that is why only use scene builder and dont try it to be manually.
          • 2. Re: When to use Scene Builder and when to write the UI code manually
            Narayan
            983304 wrote:
            I'm planning my first bigger JavaFX GUI but I'm not quite sure whether to use Scene Builder / FXML or not.
            Hi user,
            As per my knowledge I am nowadays depending in Scene Builder more than coding. If your project is some how bigger/smaller and you need to make that UI asap then I would probably chose scene builder because it is easy and very fast to develop. More it supports the live CSS editing.
            Do you have any opinions when to use Scene Builder and when to write the UI code manually?
            In my opinion you can use Scene Builder than doing the code manually and spending your developing time. I found no defects on it. But I hope there is some startup performance difference between code and fxml. Because FXML do need to parse and then execute them at runtime.
            First thing that came to my mind is dynamic UIs where number and type of fields are known only at runtime.
            This is probably impossible in FXML approach if you don't generate FXML at runtime.
            For making dynamic content what are the FXMLController for? They help you to customize your FXML components.
            What about reusable UI components? Is it easy to make reusable UI components when using FXML?
            If you are using *@FXML* annotation for any variable name equivalent to fx:id then you can use that component everywhere in your GUI.

            Thanks
            Narayan