//Title: Autolaskuri for Java with Beans //Version: //Copyright: Copyright (c) 1999 //Author: Vesa Lappalainen //Company: jyu //Description:Autolaskuri, jossa on käytetty omatekoisia Beanejä package autolaskuri; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Frame1 extends JFrame { BorderLayout borderLayout1 = new BorderLayout(); //Construct the frame public Frame1() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { this.getContentPane().setLayout(borderLayout1); this.setSize(new Dimension(400, 300)); this.setTitle("Frame Title"); } //Overridden so we can exit on System Close protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if(e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } } }