Skip to main content

AWT Event post problem.

4 replies [Last post]
jacobsq
Offline
Joined: 2007-11-21
Points: 0

I port the AWT based on micowindows(CDC basis profile).
But the demo application PBPDemoFrame.java does not run correcetlly.I find the application can not receive the paint event.
So I modified the AWT source code Window.java.I replace the Window.postPaintEvent() SunToolkit with Toolkit to post event.Surprisely, the application can run okay!!!

Then I find the same problem with Window.postKeyEvent().The application can not receive key event with the use of SunToolkit.I must modified the SunToolkit to Toolkit to post event and the application must call requestFocusInWindow() function,then the application can receive the key event.

Is there anyone know about the reason????Is there any problem with the window.java source code??

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jacobsq
Offline
Joined: 2007-11-21
Points: 0

[b]:-)[/b]
Now I have known the reason.
Because the microwindows implementation of AWT maybe too old.I find the microwindows source code version maybe a little old.The source code was written at 2001.11.28 version 1.8.

MWToolkit.java:
The MWToolkit class extends the Toolkit class ,not the SunToolkit class.The Window.java now has been using the SunToolkit.
So the qt based AWT aslo write the QtToolkit subclassed SunToolkit.
Now I modified the MWToolkit to subclass Suntoolkit, then problem has been solved.

lpallara
Offline
Joined: 2005-09-05
Points: 0

I think you are right, I submitetted the fix with another couple of, some time ago:
https://mobileandembedded.dev.java.net/issues/show_bug.cgi?id=3

bests,
Lorenzo Pallara

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> I think you are right, I submitetted the fix with another couple of, some time ago:
> https://mobileandembedded.dev.java.net/issues/show_bug.cgi?id=3
>
> bests,
> Lorenzo Pallara
>
>

Hi Lorenzo,

Now I remember. Yes, unfortunately it is still an open bug. We are
currently looking for volunteers in the phoneME Advanced community who
would be willing to help investigate and fix this bug.

Let me know if you are anyone out there would like to volunteer to fix
it and I can give you more details.

Thanks,

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> I port the AWT based on micowindows(CDC basis profile).
> But the demo application PBPDemoFrame.java does not run correcetlly.I find the application can not receive the paint event.
> So I modified the AWT source code Window.java.I replace the Window.postPaintEvent() [b]SunToolkit[/b] with Toolkit to post event.Surprisely, the application can run okay!!!
>
> Then I find the same problem with Window.postKeyEvent().The application can not receive key event with the use of SunToolkit.I must modified the [b]SunToolkit[/b] to Toolkit to post event and the application must call requestFocusInWindow() function,then the application can receive the key event.
>
> Is there anyone know about the reason????Is there any problem with the window.java source code??

Hi Jacob,

Yes, I think there might be a know bug with PBP not processing AWT
events correctly. Which version of Microwindows are you using and on
what platform?

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net