All pastes #297318 Raw Edit

Untitled

public text v1 · immutable
#297318 ·published 2006-12-31 00:28 UTC
rendered paste body
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class HelloWorld
	extends JFrame
{
	private JButton btnExit = new JButton("Exit");

	public HelloWorld()
	{
		super("My Uber Program");

		Container c = getContentPane();
		c.add(btnExit);

		btnExit.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent e)
			{
				System.exit(0);
			}
		});

		setSize(200, 200);
		setLocationRelativeTo(null);
		setVisible(true);
	}

	public static void main(String[] args)
	{
		new HelloWorld();
	}
}