Skip to main content

Events not launched for Thinlet

3 replies [Last post]
Joined: 2008-09-19

Congratulations for such a good job,
I had some problems with making Thinlet ( work in phoneme advanced in Windows Mobile.
It looks like there is a difference between the AWTEvents generated in other VMs (J9) and phoneMe. To solve my problem I had to capture every MouseEvent and generate additional events if mousepressed was launched.
I hope this code help those having problems with events.

protected void processEvent(AWTEvent e) {
if (e instanceof MouseEvent){
MouseEvent me = (MouseEvent)e;
if (me.getID()== MouseEvent.MOUSE_PRESSED) {
AWTEvent e1 = new FocusEvent(this,FocusEvent.FOCUS_GAINED);
AWTEvent e0 = new MouseEvent(this,MouseEvent.MOUSE_MOVED,0,0,

Additionally the KeyPressed event was not reaching Thinlet (it extends awt.Container) so I made Thinlet to listen to his parent's Dialog KeyPressed events.

And now a help request:

In PDAs with screen resolution of 320x240 everything works fine but in PDAs with resolution of 320x480 there is a problem with FontMetrics.

Thinlet uses FontMetrics to draw the cursor and the caret in textfields. When I click on a textfield, with just one character, to edit his value, the cursor displays a bit displaced to the right of the character. When the texfield contains more characters, this error seems to accumulate so the cursor displays very far from the letter expected.

In J9, using thinlet, the cursor displays before the end of the character. So there is a similar error on calculating the string sizes.

Thank you

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2005-06-06

Hello jacarma ,

I likewise had some problems with making Thinlet ( version v0.43 work in phoneme advanced in Windows Mobile. You succeeded?

I am try out the demo available in the same site. You can help me?

Joined: 2008-09-19

I think the new version of thinlet doesn't work in Personal Profile. I recommend you to use the older version.

Joined: 2005-06-06

I download the previous version of thinlet and its application demo. But in emulator (windows mobile 6 professional) the application demo worked well put very slow.

You can give me any tip?