Messing something up with input focus

Hi, I am writing on an MHP-Application for the second time. I am trying to implement user input with HSinglelineEntry but it's not working. I think I am doing something wrong with the focus- and HTextEvent.

Here is a code sample:

public class AppReg extends HContainer implements HFocusListener, HKeyListener{

.

.

.

private HSinglelineEntry pwField;

pwField = new HSinglelineEntry(39,159,166,30,50);

pwField.setBackground(new Color(255,255,255));

pwField.setName("password");

pwField.setFont(new Font("Arial",Font.PLAIN,20));

pwField.setForeground(new Color(255,255,255));

pwField.addHFocusListener(this);

pwField.addHKeyListener(this);

add(pwField);

public void setEditable(boolean b){

if(b){

HTextEvent startEvent = new HTextEvent(pwField,HTextEvent.TEXT_START_CHANGE);

pwField.processHTextEvent(startEvent);

}else{

HTextEvent endEvent = new HTextEvent(pwField,HTextEvent.TEXT_END_CHANGE);

pwField.processHTextEvent(endEvent);

}

}

public void focusGained(HFocusEvent setFocusEvent) {

pwField.processHFocusEvent(setFocusEvent);

}

}

How do check which component does have the focus?

How can I change the focus?

Thanks for any help.

[1319 byte] By [unimowa] at [2007-10-2 5:09:07]
# 1
Forget it. I think I have done it. Sorry bothering.
unimowa at 2007-7-16 1:12:08 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2
Hi! I磛e got problems with focus and HSinglelineEntry. How did you do?Thanks.
onttoa at 2007-7-16 1:12:08 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3
Unfortunately,I am suffering in this problem.I am a new guy to MHP.I would appreciate if you tell us how did you solved it.thank :-)
qiuping345a at 2007-7-16 1:12:08 > top of Java-index,Java Mobility Forums,Consumer and Commerce...