I am using JavaFX and this is my code. I am trying to make a column of five labels, textfields and hBoxes.
    Label[] lblTask = new Label[5];
    TextField[] taskTF = new TextField[5];
    HBox[] hb = new HBox[5];
    for(int i = 0; i < 5; i++) {
        hb[i].getChildren().addAll(lblTask[i],taskTF[i]);
        hb[i].setSpacing(10);
        hb[i].setLayoutX(30);
        hb[i].setLayoutY(120+(60*i));
        root.getChildren().add(hb[i]);
    }
It is giving me a java.lang.reflect.InvocationTargetException, and java.lang.RuntimeException and a java.lang.NullPointerException on the line that I set the spacing!
