0

I'm new at Stackoverflow and Javafx (and Java at all), so my question can be stupid.

I have a .fxml file with main window (it's include LineChart) and Controller.java, binded to it. And I need make new window with chart options (color and thickness of line). I'm making window with options by event, binded on menuItem in main window.

So, how I can change properties of chart in main window from options window? I don't understand at all how to get access to LineChart in main window!

This is how I open options window:

 void showSettings(ActionEvent event)
        throws IOException {

    Group root = new Group();
    Stage stage = new Stage();

    AnchorPane frame = FXMLLoader.load(getClass().getResource("options.fxml"));
    root.getChildren().add(frame);
    Scene scene = new Scene(root);

    stage.setScene(scene);
    stage.show();

}

Can anybody help me?

P.S. Sorry for my bad English level :c

Edit1: I need pass params from new window(options) to already existing (main)!

Hahore-kun
  • 17
  • 1
  • 6
  • Possible duplicate of [Passing Parameters JavaFX FXML](http://stackoverflow.com/questions/14187963/passing-parameters-javafx-fxml) – fabian Nov 22 '15 at 12:19
  • I think it's not that i'm need. I need pass parameters from new window to existing (better in real-time), not from existing to new... – Hahore-kun Nov 22 '15 at 13:41

0 Answers0