If you create a new JavaFX project, Intellij can compile the project just perfectly.
However, if you create a regular Java project, then add a JavaFX application to it, IntelliJ can no longer compile the app, as it complains it can't find the JavaFX packages.
This is on the same machine with only one SDK installed that has JavaFX support (Java 9).
How can I add a JavaFX app to a project that wasn't originally created as a JavaFX app and have IntelliJ compile it? Please help.