Christian Stapfer wrote:
> I have written a distributed presentation/whiteboarding application
> (Java2/Swing) for online-tutoring. Currently I use a graphics tablet to
> draw and write on the whiteboard.
> Now I would like to switch from using a separate graphics tablet to
> using the stylus of a Tablet PC. However, my Java application seems to
> drop a great many mouse drag events, which results in hardly legible
> handwriting (not so with native Tablet PC applications like Windows
> Journal).
>
> http://www.freesoft.org/software/tablet-java/
suggests patching the
Java
> runtime to solve this problem [...]
A couple of thoughts.
If the referenced article is correct then the system is only coalescing
mouse
events that you haven't consumed -- which means there should only be a
problem
if you are not keeping up with mouse movements. In such a case, you have
a
problem /anyway/. The normal system behaviour attempts to compensate for
that,
but if the strategy it uses -- chucking stuff away instead of buffering it
up -- is unsuitable (which sounds likely for any kind of mouse drawing),
then
the obvious solution is to do the buffering yourself, instead of putting
the
slow processing inline with each event as it happens.
Another thought is that the tablet's Java implementation may have the AWT
method Component.coalesceEvents() available for override in your custom
Component. I have never tried it myself, but it looks as if you can
override
that to control what events are coalesced.
-- chris


|