FileDocCategorySizeDatePackage
ChartTest.javaAPI DocExample1360Sat Nov 25 12:54:24 GMT 2000None

ChartTest

public class ChartTest extends Frame
Simple GUI driver for Chart, showing it used as a plain Component

Fields Summary
boolean
unsavedChanges
Button
drawButton
Button
quitButton
Chart
bean
Constructors Summary
public ChartTest()
Construct the object including its GUI

		super("ChartTest");
		setLayout(new FlowLayout());
		add(new Label("Simple demo of a Java Chart Bean"));
		add(quitButton = new Button("Exit"));
		quitButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
				dispose();
				System.exit(0);
			}
		});
		add(drawButton = new Button("Draw"));
		drawButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				bean.doDemo();
			}
		});

		add(bean = new Chart("System Usage in 1999"));

		addWindowListener(new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				setVisible(false);
				dispose();
				System.exit(0);
			}
		});
			
		pack();
	
Methods Summary
public java.awt.DimensiongetPreferredSize()

		return new Dimension(400, 300);
	
public static voidmain(java.lang.String[] av)
"main program" method - construct and show


	        
	     
		// create a ChartTest object
		ChartTest j = new ChartTest();
		// send message telling it to show up
		j.setVisible(true);