f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) {  PlotterAWT.this.f.setVisible(false); PlotterAWT.this.f.dispose(); System.exit(0); } });
f.addWindowListener(new WindowCloser(f, true));
	PlotterAWT() {		super();		f = new Frame("Plotter");		p = new PCanvas(MAXX, MAXY);		f.add(p);		f.pack();		f.setVisible(true);        f.addWindowListener(new WindowAdapter() {			public void windowClosing(WindowEvent e) {				// If we do setVisible and dispose, then the Close completes				PlotterAWT.this.f.setVisible(false);				PlotterAWT.this.f.dispose();				System.exit(0);			}		});		g = p.getOsGraphics();	}