/**
 * Pure Java AWT application.
 * This application realizes a windowing application.
 *
 * This file was automatically generated by
 * Omnicore CodeGuide.
 */

import java.awt.*;
import java.awt.event.*;

/**
 * Frame class.
 */
public class #project_name#Frame extends Frame
{
	/**
	 * The constructor. This method is called when the frame is created.
	 */
	public #project_name#Frame()
	{
		super("#project_name#");
		
		// Create button.
		Button button = new Button("Beep");
		button.setFont(new Font("SansSerif", Font.BOLD, 20));
		
		// Add button to frame.
		this.add(button);
		
		// Add window listener.
		this.addWindowListener
		(
			new WindowAdapter()
			{
				/**
				 * Called when window close button was pressed.
				 */
				public void windowClosing(WindowEvent e)
				{
					 #project_name#Frame.this.windowClosed();
				}
			}
		);
		
		// Add button listener.
		button.addActionListener
		(
			new ActionListener()
			{
				/**
				 * Called when button was pressed.
				 */
				public void actionPerformed(ActionEvent e)
				{
					 #project_name#Frame.this.buttonPressed();
				}
			}
		);
	}
	
	/**
	 * Called when the button was pressed.
	 */
	protected void buttonPressed()
	{
		// Beep.
		Toolkit.getDefaultToolkit().beep();
	}
	
	/**
	 * Called when the window was closed.
	 */
	protected void windowClosed()
	{
		// Exit application.
		System.exit(0);
	}
}
