How can I handle touch screen events with Swing?

Hi,I was wondering how i can handle touch screen events. Are there APIs for that or is it just a mouse event?Thank you in advance.Tim
[161 byte] By [touchscreena] at [2007-11-27 2:29:09]
# 1
It would just be a MouseEvent
tjacobs01a at 2007-7-12 2:42:01 > top of Java-index,Desktop,Core GUI APIs...
# 2
> It would just be a MouseEventThank you.So there is no way I can program a GUI application that can accept user's touch of an image from the screen with his/her finger?Tim
touchscreena at 2007-7-12 2:42:01 > top of Java-index,Desktop,Core GUI APIs...
# 3
In general you cannot use java to add new input devices. The input device needs a native driver.
tjacobs01a at 2007-7-12 2:42:01 > top of Java-index,Desktop,Core GUI APIs...
# 4

> In general you cannot use java to add new input

> devices. The input device needs a native driver.

Thank you, very interesting,

How about if the computer does have a native driver, I mean the current application(not in Java) that the computer uses can already accept finger touch action from the screen, can Java do anything with it?

You see, I am good on Java and want to change that application.

Tim

touchscreena at 2007-7-12 2:42:01 > top of Java-index,Desktop,Core GUI APIs...
# 5

> How about if the computer does have a native driver,

> I mean the current application(not in Java) that the

> computer uses can already accept finger touch action

> from the screen, can Java do anything with it?

What do you mean by 'do anything with it?'

Java should just see these events as MouseEvents. If what you're asking about is can java implement a device driver or can I use java to change the way a device driver works without native code the answer is no.

Java was created to work on a higher level and to leave these details to the OS.

>

> You see, I am good on Java and want to change that

> application.

>

> Tim

tjacobs01a at 2007-7-12 2:42:01 > top of Java-index,Desktop,Core GUI APIs...
# 6

> What do you mean by 'do anything with it?'

>

> Java should just see these events as MouseEvents. If

> what you're asking about is can java implement a

> device driver or can I use java to change the way a

> device driver works without native code the answer is

> no.

>

> Java was created to work on a higher level and to

> leave these details to the OS.

>

You are the expert! Thank you.

I should really have asked, can I code directly in Java and capture the finger action as MouseEvents and assuming that the required device driver is there to interact with my MouseEvents?

Tim

touchscreena at 2007-7-12 2:42:01 > top of Java-index,Desktop,Core GUI APIs...
# 7

I have recently created an application that ran on a touch screen system. I used the normal mouse events attached to the swing components (onClick) and these were translated by the touch screen. Typically I created a calculator type keypad, touched the screen on the text box where I wanted the data to appear and then pressed the keypad buttons to populate the field. No special drivers, just using swing components

Hope that helps

bernie_on_linea at 2007-7-12 2:42:01 > top of Java-index,Desktop,Core GUI APIs...