0

For content of JFXtras window object, should we use only code part on IDE?

Window w = new Window("My Window#"+counter);
w.getContentPane().getChildren().add(new Label("Content... \nof the window#"));
root.getChildren().add(w);

For example, i prepared an fxml document with scene builder, i want it to be shown in jfxtras window. But i couldn't make the window like a stage.

fuatkaraca
  • 47
  • 8

1 Answers1

1

Load fxml in Node and set as content

Node node = FXMLLoader.load(getClass().getResource("yourFxml.fxml"));
w.getContentPane().getChildren().add(node);
zella
  • 4,645
  • 6
  • 35
  • 60
  • It is ok now. my fxml file is in window but i think it is wrong. What is the problem sir? http://s17.postimg.org/sa0ipwc9b/image1.png http://s17.postimg.org/5ml9jqwpb/image2.png – fuatkaraca Jan 30 '15 at 11:09