Advertisement
Guest User

Untitled

a guest
May 27th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. // ChartController.java
  2. public void displayChart() {
  3.  
  4. // XYChart.Series series = new XYChart.Series();
  5. // series.getData().add();
  6.  
  7. lineChart.getData().add(series);
  8.  
  9. chartField.setContent(lineChart);
  10. }
  11.  
  12. // Main.java
  13. public void start(Stage primaryStage) throws IOException {
  14.  
  15. display();
  16.  
  17. ChartController chartController = new ChartController();
  18. chartController.setMain(this);
  19. chartController.setStage(primaryStage);
  20. chartController.displayChart();
  21.  
  22. }
  23.  
  24. private void display() {
  25. try {
  26. FXMLLoader fl = new FXMLLoader();
  27. fl.setLocation(getClass().getResource("/OverView.fxml"));
  28.  
  29. AnchorPane anchorPane = fl.load();
  30.  
  31. Scene scene = new Scene(anchorPane);
  32. stage.setScene(scene);
  33. stage.show();
  34. } catch (IOException e) {
  35. e.printStackTrace();
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement