E-Gantt Library

E-Gantt is a Gantt Chart library for Java Swing / Scheduling Visualization tool. The library is typically used for editing and visualizing complicated work schedules.

This Library was developed by Keith Long and is no longer under development you can contact the author via keithlong[at]flexcontractor[dott]com

The library E-Gantt has been successfully integrated in many open source projects and large commercial projects with-in the following industries:
  • Scheduling Research
  • Medical Research
  • US Military Defence Projects
  • Network Administration tools

The library is developed as a pure java component which integrates well with the components with-in swing, the component itself is mostly used with-in a JTable with the various flavours possible.

Projects using it on the web

The following open source projects which have integrated it and have demonstrations available. Many commercial projects are using the library, some of which prefer to remain anonymous and have a right to do so with the LGPL Licensing.

UCLA Medical Imaging

EOCEA Scheduling Research

The Licensing

E-Gantt is licensed under LGPL only, the intention of the license makes the library free for Commercial or non-Commercial works. The intention of the license is to allow you to use the library freely without the project loosing ownership over the source to a commercial project hi-jacking the library.

If the license is not appropriate to your project please contact the Author to discuss we can and will make exceptions on a per project basis.


Support is available for E-Gantt via the Discussion Forum, please be aware that support is given voluntarily and in the authors spare time. For general queries the author may be reached at http://www.flexcontractor.com


Rather than develop a brand-new table component for Swing or extend the table component making it difficult to work with. It was decided with E-Gantt despite being more difficult to integrate with the JTable without modifying it.

This serves to allow companies to use E-Gantt and their own proprietary extensions easily. The integration code with JTable has been modified in the past to work with other table components.

E-Gantt integration works by mapping the the DefaultCellRender, DefaultCellEditor of the table for it's own column class. This allows for the Gantt chart to be rendered with-in each column of the table.

The Diagram for each column is provided as an Object by the TableModel with-in e-gantt this is a DrawingState.

Drawing State

The DrawingState is a value which is used for the rendering the gantt drawing which is returned by the methd call tableModel.getValueAt(row, column).
The DrawingState contains a lot of information about the actual drawing including:
  • Location of the Top and Bottom of the Entry
  • A reference key to indicate how the Entry should be drawn
  • A reference key to indicate how the Entry should be coloured
For getting started this has been made easier by a helper class GanttEntryHelper. GanttEntryHelper can be called with as little information as a start time and a finish time this can be done as static data or called dynamically with-in the actual table model.

First Application

Your first application is as simple the JTable example in fact our example is based on this which will allow you to compare between the two implemenations:
public void show() {
//With Swing you specify the column names for a single column model model
//With E-Gantt you specify the column names for x column models
//This is done by having a double array
String[][] columnNames = {
{"First Name", "Last Name", "Sport", "# of Years"},
{ "Vegetarian"}};
//Data works the same with E-Gantt
Object[][] data = {
{"Mary", "Campione",
"Snowboarding", new Integer(5), new Boolean(false)},
{"Alison", "Huml",
"Rowing", new Integer(3), new Boolean(true)},
{"Kathy", "Walrath",
"Knitting", new Integer(2), new Boolean(false)},
{"Sharon", "Zakhour",
"Speed reading", new Integer(20), new Boolean(true)},
{"Philip", "Milne",
"Pool", new Integer(10), new Boolean(false)}
final GanttTable table = new GanttTable(data, columnNames);
//the example in Swing would show the table with E-Gantt we already live
//in-side the scroll pane to make life easier the
external image sflogo.php?group_id=49356