Home > OS >  Which Maven JavaFX dependencies does my project need?
Which Maven JavaFX dependencies does my project need?

Time:01-01

There are several JavaFX Maven dependencies:

  • javafx
  • javafx-controls
  • javafx-graphics
  • javafx-fxml

What do each of these dependencies contain? For example, I noticed that if I remove the javafx-fxml dependency, part of my code for loading FXML files breaks.

So what is the high-level objective of each dependency?

CodePudding user response:

From the source JavaFX

JavaFX is a set of graphics and media packages that enables developers to design, create, test, debug, and deploy rich client applications that operate consistently across diverse platforms.

JavaFX Controls

Base class for all user interface controls. A "Control" is a node in the scene graph which can be manipulated by the user. Controls provide additional variables and behaviors beyond those of Node to support common user interactions in a manner which is consistent and predictable for the user.

JavaFX Graphics

Defines the core scenegraph APIs for the JavaFX UI toolkit (such as layout containers, application lifecycle, shapes, transformations, canvas, input, painting, image handling, and effects), as well as APIs for animation, css, concurrency, geometry, printing, and windowing.

JavaFx FXML

Loads an object hierarchy from an XML document.

CodePudding user response:

There are more modules than the ones you have mentioned already. You find the full list here in the official documentation. https://openjfx.io/javadoc/19/

  • Related