NerdyMike
asked on
J2ME... Setting Focus on a Text Field
Hopefully a really simple one today... I have a form with a number of fields:
timeForm = new Form("Time");
timeinPSTField = new TextField("PST Time In or Minutes?", "", 4, TextField.NUMERIC);
timeoutPSTField = new TextField("PST Time Out or 0?", "", 4, TextField.NUMERIC);
timeinField = new TextField("EXEMPT Time In or Minutes?", "", 4, TextField.NUMERIC);
timeoutField = new TextField("EXEMPT Time Out or blank?", "", 4, TextField.NUMERIC);
timeForm.append(timeinPSTF ield);
timeForm.append(timeoutPST Field);
timeForm.append(timeinFiel d);
timeForm.append(timeoutFie ld);
timeForm.addCommand(okComm and);
timeForm.addCommand(exitCo mmand);
timeForm.setCommandListene r(this);
How do I set the focus to a specific field... Ie - Something like timeoutPSTField.setFocus() .
Thanks in advance!
-Mike
timeForm = new Form("Time");
timeinPSTField = new TextField("PST Time In or Minutes?", "", 4, TextField.NUMERIC);
timeoutPSTField = new TextField("PST Time Out or 0?", "", 4, TextField.NUMERIC);
timeinField = new TextField("EXEMPT Time In or Minutes?", "", 4, TextField.NUMERIC);
timeoutField = new TextField("EXEMPT Time Out or blank?", "", 4, TextField.NUMERIC);
timeForm.append(timeinPSTF
timeForm.append(timeoutPST
timeForm.append(timeinFiel
timeForm.append(timeoutFie
timeForm.addCommand(okComm
timeForm.addCommand(exitCo
timeForm.setCommandListene
How do I set the focus to a specific field... Ie - Something like timeoutPSTField.setFocus()
Thanks in advance!
-Mike
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!