All pastes #297317 Raw Edit

Anonymous

public text v1 · immutable
#297317 ·published 2006-12-31 00:27 UTC
rendered paste body
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();
	}
}