views:

44

answers:

2

Hi

there are three edit field on my mainscreen i want to know which edit field is on focous.

thanks alot

A: 

isFocus

public boolean isFocus() Determines if this field currently has the focus.

Returns: True if this field has the focus; otherwise, false.

Since: JDE 4.2.0

Vivart
A: 

Alternatively, you can have your Mainscreen class implement FocusChangeListener. If you instantiate your Edit controls as Focusable, and implement the listener:

public void focusChanged(Field field, int eventType)
{
    if(field == YourEditField1)
    {
    }
    else if (field == YourEditField2)
    {
    }
}
TreeUK