Does Java 1.8.0_31 has the javafx.scene.control.Alert class how can I import it to my project

2.5k Views Asked by At

I'm trying to import Alert class but doesnt work. Does Java 1.8.0_31 has the javafx.scene.control.Alert class can I import it to my project

1

There are 1 best solutions below

2
On BEST ANSWER

Java 1.80_31 doesn't have Alert. If you go through the JavaDoc of Alert and scroll down, at the end of class description you will find the since tag which says JavaFX 8u40. As JavaFX follows the update version of Java, it means it is available since Java 1.8.0_40.

You need to use Java version greater than or equal to Java 8 update 40 to use Alert in your project.