
With Java 11 and higher JavaFX is no longer bundled with the JDKs from Oracle, so you have to make sure to download and install a JDK 11+ distribution that does include it, e.g. from Azul.
Go to the downloads section of FlexGanttFX.com and download the latest release. The download file will be a ZIP archive containing the required JAR files, demos, tutorials, API documentation, etc…
Unzip the distribution to your local file system. Once unpacked you will see the following content:
The distribution contains the following subfolders:
Assuming that you downloaded release 11.12.5 then add the following files (located in the distribution’s lib folder) to your classpath.
Add the files located in the ext folder to your classpath.
The following listing shows the most basic setup that is required to launch a Gantt chart user interface.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import com.flexganttfx.view.GanttChart;
public class MyFirstGanttChart extends Application {
@Override
public void start(Stage stage) throws Exception {
// <- Our Gantt chart
GanttChart<?> gantt = new GanttChart<>();
Scene scene = new Scene(gantt);
stage.setScene(scene);
stage.centerOnScreen();
stage.sizeToScene();
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
Contact us and we’ll get back to you as soon as possible.
Submit a Request