View Test Results.
package cs221.groupk.ticketing.gui; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import cs221.groupk.ticketing.*; import cs221.groupk.common.GuiConstants; /** * * <P><I>Code spell-checked - Chris Milner - 5th December 2000.</I><P> * */ public class Ticketing extends JFrame implements GuiConstants { /** * drawComponents method is called from <CODE>execute()</CODE> to create * the JFrame, and initilise all components. */ protected void drawComponents() { System.out.print("Drawing Frame..."); Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension screenSize = toolkit.getScreenSize(); setBounds(screenSize.width/4, screenSize.height/4, screenSize.width/2, screenSize.height/2); addWindowListener(new TicketingWindowListener()); //Create and add components here. pack(); setVisible(true); System.out.println(" done."); } /** * execute is the first non-static method called by <CODE>main</CODE>. */ protected void execute() { drawComponents(); } /** * main is the executable bootstrap method called by the Java VM. * @param String[] arguments from the command line. */ public static void main(String[] args) { Ticketing ticketing = new Ticketing(); ticketing.execute(); } public class TicketingWindowListener extends WindowAdapter { public void windowClosing(WindowEvent e) { System.exit(0); } } }Page automatically generated on: 26/01/01 at: 10:48:20.