Archive

Posts Tagged ‘panel’

JavaFX – Custom Layout

December 16, 2009 Leave a comment

Bookmark and Share

In one of the previous post I suggested to use Layout and Layout related attributes. But it didn’t clearly demonstrate how to use that for developing an application. So here is an example which uses Panel to layout the components.


To launch click on above image or

The components can be positioned using various methods available in Container such as getManaged, getNodePrefSize, positionNode, resizeNode and layoutNode. The entire layout of components is done in onLayout function. This function will be invoked when ever there is need to layout the content nodes. We may explicitly update layout using requestLayout function.

Try it out and let me know feedback..

Advertisements
Categories: javafx Tags: , , ,