How does the JavaFX gridpane layout set margins for elements in rows?
•
Java
I am using the gridpane layout to locate the content in the application I want to know how to set margins for elements in a row
GridPane.setConstraints(chip5,1,HPos.RIGHT,VPos.TOP); //I want to set // margin for chip5 from top (for example 5px)
Is it OK in gridpane?
Solution
You can set margins for any specific node:
GridPane.setMargin(chip5,new Insets(5,0));
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码