Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ChartController.java
- public void displayChart() {
- // XYChart.Series series = new XYChart.Series();
- // series.getData().add();
- lineChart.getData().add(series);
- chartField.setContent(lineChart);
- }
- // Main.java
- public void start(Stage primaryStage) throws IOException {
- display();
- ChartController chartController = new ChartController();
- chartController.setMain(this);
- chartController.setStage(primaryStage);
- chartController.displayChart();
- }
- private void display() {
- try {
- FXMLLoader fl = new FXMLLoader();
- fl.setLocation(getClass().getResource("/OverView.fxml"));
- AnchorPane anchorPane = fl.load();
- Scene scene = new Scene(anchorPane);
- stage.setScene(scene);
- stage.show();
- } catch (IOException e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement