The moose likes General Computing and the fly likes Touch Screen Programming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Touch Screen Programming" Watch "Touch Screen Programming" New topic

Touch Screen Programming

Howard Ralston
Ranch Hand

Joined: Jun 25, 2001
Posts: 105
I have been asked to help another student to with her senior project. It will involve an application using touch screen technology. I will use Java or Visual C++ to write the application, but I cannot find any books that relate to touch screen programming. I have never tried nor spoken to anyone who has written a program for use with a touch screen. Can anyone give me some guidance in making the first step toward writing a program for a touch screen?

<a href="" target="_blank" rel="nofollow">Free local coupons</a>
Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

I did a search on "touch screen monitor Java" on Google and found quite a few projects that use both, but no descriptions on what they did to get it to work... I suspect that the OS simply treats the touch screen as a mouse and you get mouse events... but I will try to look into this further...


Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Howard Ralston
Ranch Hand

Joined: Jun 25, 2001
Posts: 105
Thanks for the help! I met with her yesterday, and she seems amenable to creating the project as an application using a regular monitor with a mouse (time constraints). However, I would like to find out for myself how the touchscreen would affect the programming effort. I believe I will try to contact one of the manufacturers and ask.
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
I've worked with several touch screens in the past and every single one of them came with a driver that made it look to the OS like it was a mouse. Dragging your finger made the mouse move. Often it would interpret sudden movements on a single spot as a mouse click, or double-click -- often you could set this up in the driver configuration screen.
The bigger issue is to design your GUI so that it works well with a touch screen. That means things like big buttons, no controls (like drop-downs -- nasty things!) that require a resolution smaller than a finger, etc...

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.

Joined: Jun 20, 2002
Posts: 1
does anybody out there know how to programme a microcontroller to control a touch screen, without a pc? say, use a small touchscreen to contol a dvd player?
just help point me in the right direction... maybe a webpage or something... thanks
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
I will point you in the right direction.
Welcome to the JavaRanch! Please adjust your display name to meet
the JavaRanch Naming Policy. You can change it here.
and welcome to the JavaRanch!
I agree. Here's the link:
subject: Touch Screen Programming
It's not a secret anymore!