Are the following two versions of "pane" the same in Java?
Pane pane1 = new HBox();
HBox pane2 = new HBox();
What is the difference between the two and why would you declare pane1 this way?
Thank you very much.
Are the following two versions of "pane" the same in Java?
Pane pane1 = new HBox();
HBox pane2 = new HBox();
What is the difference between the two and why would you declare pane1 this way?
Thank you very much.
There is a hierarchy of classes. See the Figure below.
In a variable of Pane type you could store a VBox or a HBox for example.
But if you declare the variable as VBox, it can only store a VBox object.