// Copyright 2001-2005, Danger, Inc.  All Rights Reserved.
// This file is subject to the Danger, Inc. Sample Code License,
// which is provided in the file SAMPLE_CODE_LICENSE.
// Copies are also available from http://developer.danger.com/

package com.danger.midlet_helloworld;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

public class HelloWorld extends MIDlet
{
	public void startApp()
	{
		final Form form = new Form("MIDlet Hello World");
		StringItem strItem = new StringItem(null, "Hello world!");
		form.append(strItem);

		final Command quit = new Command("Quit", Command.EXIT, 1);
		form.addCommand(quit);
		form.setCommandListener(new CommandListener()
			{
				public void commandAction(Command c, Displayable d)
				{
					if (c == quit && d == form)
						notifyDestroyed();
				}
			});

		Display.getDisplay(this).setCurrent(form);
	}
	public void pauseApp() {}
	public void destroyApp(boolean unconditional) {}
}
