Layout pane is a container where you organize all your UI components. Each layout pane has its own style about the placement and size of the nodes it comprises.
Advantages of layout pane
a. Automatically reposition the elements, when new components added or deleted.
b. Automatically resize the components when UI window shrinks or grows.
Layout pane hierarchy
Node -> Parent -> Region -> Pane -> (GridPane, AnchorPane, HBox etc.,)
Region
Region is an area of the screen that contain other nodes. Region can be styleable with css and resizable.
Important properties of Region
width, height
minWidth, minHeight
maxWidth, maxHeight
prefWidth, prefHeight
padding
snapToPixel
Pane class
Pane class offers common functionality required by all other layout pane class, except the layout style logic. Layout logic implemented by each pane in its own way.
No comments:
Post a Comment