Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Scroll using fingers in a touch screen  RSS feed

 
Aji Sree
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anybody please tell me if it is possible to program scrolling function through up/down movement of the finger on a touch screen?

I have a Jtable which is attached to a scroll pane.

I have two buttons on touching on which I can scroll up or down the rows of the table..

But my question is , is it possible if we move the finger over the scroll pane up or down (of course on the touch screen), whether I can scroll the records?

If so which event I should invoke? Please help if anybody have the answer.

Thank you
Ajith
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You do not have to program anything special.
Just do it the usual way with action listeners to the table which will trigger the required scroll movement.

JTable has built in methods which you can use to show some particular row(s). You do not really require to do anything with the scroll pane.
 
Aji Sree
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maneesh,

Thank you for your reply.

It is working when I am in the top/bottom of the table.

Whether it is possible to scroll like in iPhone?

I mean scrolling up not only when top and bottom is reached but also when the finger moves up or down in the middle across several rows. Just like the iPhone.

Thank you
Ajith
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!