• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Handle Stylus Event

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am developing swing application. When mouse clicked on text box i have to open a dialog. It works fine.
When clicked on text box using stylus, mouse click event handling does not happens properly.
What event should I use to handle stylus click.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What type of device are you using? Because I don't remember my work and home PCs being able to interact with styluses; only my old Windows Mobile phone was. Or do you mean you use a pen that's connected to your PC?

Either way, Swing and events have nothing to do with sockets or Internet protocols, so I'm moving this thread to our GUI forum.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would guess that the Point of mousePressed and mouseReleased my not be close enough (as determined by system properties not configurable from Java) to generate a mouseClicked. Try using mousePressed instead.

Also

event handling does not happens properly.


Define 'properly'
 
selva nayagam.K
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,

I have wacom touch screen monitor.

event handling does not happens properly means, when we press stylus on the text box mouse clicked event is not getting triggered.
 
Darryl Burke
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you read the first paragraph of my earlier response? did you try that?
 
Rob Spoor
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Darryl may be right. You see, a mouse click is a mouse pressed followed by a mouse released within a specific time and within a specific distance. If either the time or the distance is too great there is no mouse clicked event, but there are still the mouse pressed and mouse released events.

Can you see if those two events do get triggered? You may want to print out the event's time and point, then compare the differences:
 
reply
    Bookmark Topic Watch Topic
  • New Topic