I need to rotate the same node in a single HBox to 45, 90, 135 degrees respectively.
I have the following so far but it just returns the complete HBox rotated at 135 degrees.
public HBox getBox() throws Exception {
HBox hb = new HBox();
hb.getChildren().clear();
// Add nodes to hbox
for (int i = 1; i <= 3; i++) {
hb.setRotate(45 * i);
hb.getChildren().add(new ImageView(new Image(new FileInputStream("myFile.png"))));
}
return hb;
}