package com.tutego.insel.me;

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

public class HelloMIDlet extends MIDlet implements CommandListener
{
  private Command exitCommand;
  private Display display;
  public HelloMIDlet()
  {
    display = Display.getDisplay( this );
    exitCommand = new Command( "Ende", Command.SCREEN, 2);
  }
  public void startApp()
  {
    TextBox t = new TextBox( "Hello MIDlet", "Wireless Internet", 256, 0 );
    t.addCommand( exitCommand );

    t.setCommandListener( this );
    t.setTicker( new Ticker("Java ME is cool") );
    display.setCurrent( t );
  }
  public void pauseApp() { }

  public void destroyApp( boolean b ) { }

  public void commandAction( Command c, Displayable s )
  {
    if ( c == exitCommand )
    {
      destroyApp( false );
      notifyDestroyed();
    }
  }
}