I'm working on a project in Eclipse and I want to make use of JavaFX for my GUI. I installed JavaFX and I added it to my project library. When I try to import "import javafx.fxml.FXMLLoader;" there is an error:"The type javafx.fxml.FXMLLoader is not accessible". image: https://ibb.co/QmpFKDF
code:
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Hello extends Application {
public void start(Stage stage) throws Exception {
Parent root = FXMLLOADER.load(getClass().getResource(
"Hello.fxml"));
Scene scene = new Scene(root);
stage.setTitle("Hello");
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Thanks.