/*
* Created on Nov 3, 2003
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package org.eclipsebook.ch06;
import java.awt.*;
import java.awt.event.*;
/**
* @author Steven Holzner
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class Ch06_02 {
public static void main(String [] args)
{
AppFrame f = new AppFrame();
f.setSize(200, 200);
f.addWindowListener(new WindowAdapter() { public void
windowClosing(WindowEvent e) {System.exit(0);}});
f.show();
}
}
class AppFrame extends Frame
{
public void paint(Graphics g)
{
g.drawString("Hello from Eclipse!", 60, 100);
}
}
|