Tablets mean giving up some Java interactivity?

M

Mickey Segal

One of the advantages of Java is being able to add interactivity to programs
more than is possible with other Web technologies. As an example, an applet
can examine input to a TextField and change the TextField contents to flag
or fix errors. However, this ability is impaired by the way input from
Tablet computers (or external pen/tablets) has been implemented.

Input from Tablet computers to Java TextFields triggers only
textValueChanged events, not Key events (in any reliable or useful way). In
addition, modifying the contents of the TextField using setText also
triggers only textValueChanged events. So if you want input from a Tablet
to TextField to be modified by setText you get into infinite recursion of
textValueChanged calling setText which calls textValueChanged ....

This problem is illustrated with a working applet (without the infinite
recursion), source code, and examples of output at:
http://www.segal.org/java/tablet_events3/

Are there any good solutions other than giving up calling setText from
textValueChanged? Some possible approaches are discussed at the URL above,
but none seem satisfactory. A change in the Java specification to create
new Tablet events or mandate Key events for Tablet input would solve the
problem, but such changes are not easy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top