/* * @(#)Harjoitus0.java 1.0 01/11/28 * * You can modify the template of this file in the * directory ..\JCreator\Templates\Template_1\Project_Name.java * * You can also create your own project template by making a new * folder in the directory ..\JCreator\Template\. Use the other * templates as examples. * */ package myprojects.harjoitus0; import java.awt.*; import java.awt.event.*; class Harjoitus0 extends Frame { public Harjoitus0() { addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { dispose(); System.exit(0); } }); } public static void main(String args[]) { System.out.println("Starting Harjoitus0..."); Harjoitus0 mainFrame = new Harjoitus0(); mainFrame.setSize(400, 200); mainFrame.setTitle("Harjoitus0"); mainFrame.setVisible(true); } }