Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package onlinecontactbackup;
- import javax.microedition.lcdui.*;
- import javax.microedition.midlet.*;
- public class MainMenuScreen extends MIDlet implements CommandListener {
- private Display display;
- private Command exitCommand = new Command("Exit",Command.EXIT,1);
- private Command NewUserCommand = new Command("New User",Command.SCREEN,1);
- private Command LoginCommand = new Command("Login",Command.SCREEN,2);
- private Form form;
- private TextField Full_Names;
- private TextField User_Name;
- private TextField E_Mail;
- private TextField Pass_Word;
- private TextField Verify_Password;
- private TextField txtInput;
- public MainMenuScreen(){
- // txtInput = new TextField("Enter Your Full Names:","",30,TextField.ANY);
- // txtInput = new TextField("Create user name:","",30,TextField.ANY);
- // txtInput = new TextField("Enter Email:","",30,TextField.ANY);
- // txtInput = new TextField("Enter Password:","",30,TextField.PASSWORD);
- // txtInput = new TextField("Re Enter Password:","",30,TextField.PASSWORD);
- form = new Form("Manage Phone Book Account");
- // form.append(txtInput);
- form.addCommand(exitCommand);
- form.addCommand(NewUserCommand);
- Full_Names = new TextField("Enter Your Full Names:","",30,TextField.ANY);
- User_Name = new TextField("Create user name:","",30,TextField.ANY);
- E_Mail = new TextField("Enter Email:","",30,TextField.ANY);
- Pass_Word = new TextField("Enter Password:","",30,TextField.PASSWORD);
- Verify_Password = new TextField("Re Enter Password:","",30,TextField.PASSWORD);
- form.append(Full_Names);
- form.append(User_Name);
- form.append(E_Mail);
- form.append(Pass_Word);
- form.append(Verify_Password);
- form.setCommandListener(this);
- form.addCommand(LoginCommand);
- txtInput = new TextField("User Name:","",30,TextField.ANY);
- txtInput = new TextField("Password:","",30,TextField.PASSWORD);
- form.setCommandListener(this);
- }
- public void initMidlet(){
- display = Display.getDisplay(this);
- display.setCurrent(form);
- }
- public void ExitMidlet() throws MIDletStateChangeException{
- destroyApp(true);
- notifyDestroyed();
- }
- public void commandAction(Command c, Displayable d) {
- if(c==exitCommand){
- try {
- this.ExitMidlet();
- } catch (MIDletStateChangeException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- if(c==NewUserCommand){
- String input = txtInput.getString();
- }
- else if(c==LoginCommand){
- String input = txtInput.getString();
- }
- }
- protected void destroyApp(boolean unconditional) throws MIDletStateChangeException {
- // TODO Auto-generated method stub
- }
- protected void pauseApp() {
- // TODO Auto-generated method stub
- }
- protected void startApp() throws MIDletStateChangeException {
- if(display==null){
- initMidlet();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement