Hi I'm trying to write a multi-formed J2ME app. I keep getting a null pointer exception in the startApp() method.
public void startApp()
{
display.setCurrent(currentForm);
}
I have currentForm created above and the first is mapped to it, (with the plan of mapping each new from to currentForm.
private Form currentForm, login; //etc
currentForm = login;
I have login set up, so I'm really confused why I getting this error. :confused:
loginTF = new TextField[2];
loginTF[0] = new TextField("Staff Number:", "", 10, TextField.NUMERIC);
loginTF[1] = new TextField("Password:", "", 50, TextField.PASSWORD);
login = new Form("login", loginTF);
login.addCommand(submit);
login.addCommand(exit);
login.addCommand(clear);
login.setCommandListener(this);
Everything above has been declared as usual. Any suggestions as to what I'm doing wrong?
Thanks, chuck