TableReaderFactory.createTableReader(fileName, t);
if (reader == null || !reader.load()) { // if it works, load the file
System.err.println("cannot load " + fileName);
System.exit(1);
}
TimeSeriesVisualization visualization = // Create a visualization
new TimeSeriesVisualization(t); // for Time Series
VisualizationPanel panel = // Create a Swing Component to hold it
new VisualizationPanel(visualization);
// Associate the color with the Name attribute
visualization.setVisualColumn(
TimeSeriesVisualization.VISUAL_COLOR,
t.getColumn("Name"));
// Display the visualization Panel in a simple JFrame
JFrame frame = new JFrame(fileName);