Soulmaintain
Soulmaintain

Reputation: 1

How to increase the width of sub fxml file when maximize the size of window in javafx

I am new in javafx and I used following code to display the sub fxml file in main design. But now I am facing problem with design part.When I maximize the size of the main design the sub design will not stretch. Which make lot of space at right side and bottom. I have created sample code for make you easy to understand please download it from following link Please View this and let me know how can I solve it. Run it and do action you will know what i mean in above.

www.anamol.com.np/Example.rar

Upvotes: 0

Views: 83

Answers (1)

Kalaschni
Kalaschni

Reputation: 2438

I have not downloaded the source but i think an AnchorPane would make it.
And set following:

AnchorPane.setTopAnchor(yourNode, 0);
AnchorPane.setRightAnchor(yourNode, 0);
AnchorPane.setBottomAnchor(yourNode, 0);
AnchorPane.setLeftAnchor(yourNode, 0);

Upvotes: 0

Related Questions