1 Reply Latest reply: Nov 2, 2012 10:38 AM by jsmith RSS

    HBox problem

    kapac
      Hi;
      how to make components at inegal distance between them in a hbox?
        • 1. Re: HBox problem
          jsmith
          I am going to guess that inegal means unequal.

          Use a padding style on the nodes is the HBox.
          For example:
          n1.setStyle("-fx-padding: 0, 5, 0, 0");
          n2.setStyle("-fx-padding: 0, 25, 0, 0");
          n3.setStyle("-fx-padding: 0, 15, 0, 0");
          There are other ways to do this too such as creating and adding spacer components, setting the minimum width of your nodes or using HBox static layout methods.