I am currently using a normal java project (gradle project) and want to convert this into a JavaFx project without having to reimport the existing sources into a new Javafx
I followed those steps
Controller.java,Main.java and sample.fxml into your module in the (A) project under the src directory as in A/user-interface/srcsample.fxml since it references the controller class as sample.Controller change it to 'Controller' only. it worked this way (as I removed the sample package folderFile | Project Structure | Modulesuser-interface module from the list on the left side of the settings windowdependencies tab+ mark on the right-hand sidenote: you can skip the add module dependency and let intellij do it for you, just type a name of a class in the old module, alt+enter (the light bulb magic) -> add module depenency