Home > database >  Adding JavaFX 17.0.2 into existing Java 11 Project IntelliJ IDEA
Adding JavaFX 17.0.2 into existing Java 11 Project IntelliJ IDEA

Time:02-05

As part of a uni project, I'm trying to add a GUI to an existing Java project using JavaFX. The initial project used Java 11 and the JavaFX version I have is 17.0.2 but I just keep getting a lot of different errors depending on what I do. I'm using IntelliJ IDEA

Does anyone know how to add JavaFX to existing projects?

My lecturer is no help at all

CodePudding user response:

Make a new project

enter image description here

I suggest setting up a new JavaFX-focused project.

IntelliJ offers a project template expressly for that purpose. See this documentation page, Create a new JavaFX project.

Then move over any existing code you have. You can do so by drag-and-drop into the project window.

You will find the OpenJFX library has been included as a dependency. OpenJFX is an open-source implementation of JavaFX. OpenJFX is organized as a sub-project on the OpenJDK project, co-led by Gluon and Oracle.

  •  Tags:  
  • Related