Javatpoint Logo
Javatpoint Logo

JavaFX StackPane

The StackPane layout pane places all the nodes into a single stack where every new node gets placed on the top of the previous node. It is represented by javafx.scene.layout.StackPane class. We just need to instantiate this class to implement StackPane layout into our application.

Properties

The class contains only one property that is given below along with its setter method.

Property Description Setter Method
alignment It represents the default alignment of children within the StackPane's width and height setAlignment(Node child, Pos value)
setAlignment(Pos value)

Constructors

The class contains two constructors that are given below.

  1. StackPane()
  2. StackPane(Node? Children)

Example

Output:


JavaFX StackPane output
Next TopicJavaFX GridPane




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA