FileDocCategorySizeDatePackage
TableChartPopup.javaAPI DocExample571Thu Oct 24 20:14:26 BST 2002None

TableChartPopup.java

// TableChartPopup.java
// A popup framework for showing a chart of table data.  This class also
// turns on tooltips for the chart.
//
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public class TableChartPopup extends JFrame {

  public TableChartPopup(TableModel tm) {
    super("Table Chart");
    setSize(300,200);
    TableChart tc = new TableChart(tm);
    getContentPane().add(tc, BorderLayout.CENTER);

    // Use the next line to turn on tooltips:
    ToolTipManager.sharedInstance().registerComponent(tc);
  }
}