/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package j;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;

public class Form0 {

public static Command Command0=null;
public static Command Command1=null;
public static TextField text0=null;
public static Form Form0=null;

void GUI ()
{
  // Form0 = new Form("From test");
  //Form0.setCommandListener(this);
  
}
public static void Start0(){
Form0 = new Form("Form0: Edit mode");
text0=new TextField("Any","",40,TextField.ANY);
Form0.append(text0); //any type
/*
Form0.append(new TextField("E-mail","",24,TextField.EMAILADDR));//E-mail type
Form0.append(new TextField("number","",24,TextField.NUMERIC));//Shaping data type
Form0.append(new TextField("float","",24,TextField.DECIMAL));//floating point type
Form0.append(new TextField("phone","",24,TextField.PHONENUMBER));//Phone type
Form0.append(new TextField("password","",24,TextField.PASSWORD));//password type
Form0.append(new TextField("website URL","",24 ,TextField.URL));//URL type
*/
Command0 = new Command("ok",Command.ITEM,0);
//Command1 = new Command("clear",Command.SCREEN,1);
Form0.addCommand(Command0);
//Form0.addCommand(Command1);
//Form0.setCommandListener(this);

Form0.setCommandListener(new CommandListener() {
     

    public void commandAction(Command c, Displayable d) {
        //System.out.println("Form is teste Tested");
       /* 
      if(c==Command1){
      j.Midlet0.TTT[j.Midlet0.I]=j.Midlet0.EraserL(j.Midlet0.TTT[j.Midlet0.I]);
      j.Form0.text0.set
      }*/
      
        if(c==Command0){
      //text0.setString(RW.getRecord(Midlet0.II));
            
            j.Midlet0.TTT[j.Midlet0.I]=text0.getString();
      //j.Midlet0.TTT[j.Midlet0.I]=(RW.getRecord(Midlet0.II));
      j.Screen0.display.setCurrent(j.Midlet0.canvas0);  
              }
        
    
    }
    });

}}
