--module-path 방금다운로드한_JavaFX의_lib_경로 --add-modules javafx.controls,javafx.fxml예시: --module-path /Users/kyu/Downloads/javafx-sdk-11.0.2/lib --add-modules javafx.controls,javafx.fxml

Scene Builder: JavaFX를 GUI로 만들 수 있는 개꿀템
다운

Group root = new Group();
//화면 보여주는 부분
//컴포넌트 넣은 뒤에 선언해주면 됨
Scene scene = new Scene(root, 600, 400);
primaryStage.setTitle("MyJavaFX");
primaryStage.setScene(scene);
primaryStage.show();
Button b = new Button("난버튼이다");
root.getChildren().add(b);
Button b = new Button("난버튼이다");
root.getChildren().add(b);
b.setOnAction(this);
handle() 를 구현한다. ObservableList<PieChart.Data> pieData = FXCollections.observableArrayList(
                new PieChart.Data("IT Programs", 40),
                new PieChart.Data("Nursing", 70),
                new PieChart.Data("Accounting", 20),
                new PieChart.Data("Arts", 30),
                new PieChart.Data("Enginerring", 10)
        );
        PieChart pChart = new PieChart(pieData);
        root.getChildren().add(pChart);

    @Override
    public void handle(ActionEvent actionEvent) {
  
        String path;
  
        try {
            // FileChooser 생성
            FileChooser fc = new FileChooser();
  
            // csv 파일만 불러오도록 필터링하기
            fc.getExtensionFilters().addAll(
                    new ExtensionFilter("CSV Files", "*.csv")
            );
  
            // 파일 선택하는 화면 띄우기
            File selectedFile = fc.showOpenDialog(null);
            // 선택된 파일 절대 경로 return 해서 얻기
            if (selectedFile != null) {
                path = selectedFile.getAbsolutePath();
            } else {
                System.out.println("file is not vaild");
            }