since these methods are static i can either call it from an instance of HBox or directly. The question is how do i do it directly? I see examples like :
instead of using : HBox hbox = new HBox(); hbox.setMargin(btn1, new Insets(10));
i should be using: Hbox.setMargin(btn1, new Insets(10));
and hBox.setMargin(btn1, new Insets(10));
and yet HBOX.setHGrow(spacer, Priority.ALWAYS);
.
So can i use any made up name infront of the dot operator and it would work?
It sure does not until I type "HBox" and then my IDE asks me to assign return value to the new variable and makes up the following code :
HBox setMargin = HBox.setMargin(btn1, new Insets(10));
This is defeating the purpose of making the methods static. Can anybody help me with this?