0
 final WebView img = new WebView();
         final WebEngine Img = img.getEngine();
         final DoubleProperty zoomProperty = new SimpleDoubleProperty(200);
 img.addEventFilter(KeyEvent.KEY_RELEASED, (KeyEvent e) -> {
            if (e.getCode() == KeyCode.ADD || e.getCode() == KeyCode.EQUALS || e.getCode() == KeyCode.PLUS) {
                System.out.println("YES");
                    //zoomProperty.set(zoomProperty.get() * 1.1);
            }
            else if(e.getCode()== KeyCode.SUBTRACT||e.getCode() == KeyCode.MINUS ){
                System.out.println("YES");
               // zoomProperty.set(zoomProperty.get() / 1.1);
            }
        }); 

as i had tried this through this im able to listen to key but zoomin and zoom out is not working in webview

Narendra.kr
  • 181
  • 3
  • 12

0 Answers0