/** This program is intended to be used with the book "Java -- What Do You Want To Do?"
 * by Steven P. Warr and is distributed free of charge and without and expectations of remuneration.
 * Chapter CELL   NOTE most program names begin with the title of the chapter in which
 * they are intended to be used.   Copyright 2010 Steven P. Warr All rights reserved
 */

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.RichTextField;
import net.rim.device.api.ui.component.ButtonField;

import net.rim.device.api.ui.*;


class Cell01 extends UiApplication 
{
     public static void main(String[] args)   // main section -- starting point
    {
        Cell01 theApp = new Cell01();
        theApp.enterEventDispatcher();
    }

    public Cell01()
    {
        pushScreen(new Cell01Screen());
 
    }    
}

final class Cell01Screen extends MainScreen  // draws components on the screen
{
    Cell01Screen()
    {
        LabelField title = new LabelField("Cell01 Demo" , 
        	LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
        setTitle(title);
     	add(new RichTextField("Cell01" ,Field.NON_FOCUSABLE));
     
    }
    public void close()
    {
        Dialog.alert("Goodbye!");
        System.exit(0);
        
        super.close();
    }   
}
