Saturday, June 23, 2012

JavaFX 2 Layouts: AnchorPane

Hello and welcome back to JavaFX 2 Layouts tutorial series. This is a tutorial about AnchorPane. The Anchor Pane layout pane enables you to anchor nodes to the top, bottom, left side, right side, or center of the pane. As the window is resized, the nodes maintain their position relative to their anchor point. Nodes can be anchored to more than one position and more than one node can be anchored to the same position. Below you can take a look how our program will look in the end of this tutorial. AnchorPane is a nice layout to use, because it  allows nodes to resize, in our example list should stretch as anchorpane is resized. You may also notice that when you setting up AnchorPosition, you will need to enter a double value, which represents distance from the edges.
JavaFX 2 AnchorPane
JavaFX 2 Layout AnchorPane


If you want, you can check other  tutorials from JavaFX 2 Layouts series:

0 comments:

Post a Comment