0

I'm working on wizard installer in JavaFX and I need few windows with AnchorPnane with this same size. Now in *.fxml file I have lines:

 <AnchorPane prefHeight="300.0" prefWidth="300.0"

I will have few similar files *.fxml so I need keep information about size in my java class:

public final int HeightOfAnchorPane=300;
public final int WidthOfAnchorPane=300;

How can I set value of height and width to file *.fxml from my java class? Like this:

<AnchorPane prefHeight = HeightOfAnchorPane prefWidth= WidthOfAnchorPane

EDIT: @james-d I thank you for this post: How can I make constant variables in Javafx for XML files but if I import class in *.fxml file I couldn't open file with SceneBuilder. Someone can fix it?

Community
  • 1
  • 1
Patres
  • 147
  • 2
  • 20
  • @James_D I edited my post. If I import class to *.fxml file I couldn't open this file with SceneBuilder. Is other way? – Patres Jul 09 '15 at 19:57
  • To use your own classes in SceneBuilder, you have to bundle them into jar file(s) and import them into the SceneBuilder library. See http://stackoverflow.com/questions/30063792/adding-a-custom-component-to-scenebuilder-2-0 – James_D Jul 09 '15 at 20:04
  • Thank you for answer. You are very helpful! – Patres Jul 09 '15 at 20:11

0 Answers0