Installation
FlexGanttFX 12.4.0 is available from Maven Central. Add the view dependency using Maven or Gradle. Add extras if you need the optional helper controls.
Maven
<dependency>
<groupId>com.flexganttfx</groupId>
<artifactId>view</artifactId>
<version>12.4.0</version>
</dependency>
<!-- Optional helper controls -->
<dependency>
<groupId>com.flexganttfx</groupId>
<artifactId>extras</artifactId>
<version>12.4.0</version>
</dependency>
Gradle
implementation "com.flexganttfx:view:12.4.0"
implementation "com.flexganttfx:extras:12.4.0" // optional
Licensing
FlexGanttFX is dual licensed. You may use it free of charge under the GNU Affero General Public License v3 if your own application is open source under the same license. For proprietary, closed-source or SaaS applications a commercial license is required. No license key has to be installed — see the licensing page for details.
Create Application Class
The following listing shows the most basic setup 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);
}
}