Link to home
Start Free TrialLog in
Avatar of NerdyMike
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(timeinPSTField);
        timeForm.append(timeoutPSTField);
        timeForm.append(timeinField);
        timeForm.append(timeoutField);
        timeForm.addCommand(okCommand);
        timeForm.addCommand(exitCommand);
        timeForm.setCommandListener(this);

How do I set the focus to a specific field...  Ie - Something like timeoutPSTField.setFocus().

Thanks in advance!

-Mike
ASKER CERTIFIED SOLUTION
Avatar of x4u
x4u

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NerdyMike
NerdyMike

ASKER

So easy when you get the exact code!  I looked on Google for 45 minutes and couldn't easily find it!  (I found similar ones but not as precise as yours).


Thanks!