Swipe on TouchScreen

Having problems with building or using the JCEF Java binding? Ask your questions here.

Swipe on TouchScreen

Postby itaks » Tue Jun 07, 2022 1:27 pm

Hi.

Could you explain me how to swipe with coordinates when user touch the screen and do a swipe?

I see that when user do a drag on screen i have an output that i have shown with println.

Code: Select all
browerUI_.addMouseMotionListener(new MouseMotionListener() {
            @Override
            public void mouseDragged(MouseEvent e) {
                System.out.println("Dragged "+e.getX()+" | "+e.getY());
               
            }
});


I've tried with

Code: Select all
browser_.executeJavaScript("window.scrollTo("+e.getX()+", "+e.getY()+")","", 0);


but i whink that is not correct.

Thank you.
itaks
Techie
 
Posts: 18
Joined: Wed Mar 09, 2022 6:00 pm

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 18 guests