1

JFxPanel is taking the scroll bar automatically .My requirement is to get the current position of the scroll bar in JFxPanel and again i could set the position of the scroll bar in JFxPanel . I am badly stuck here any help is appreciated . To open the html file in JFxPanel , I am using the following code.

try
{ 
File f1=new File("path upto html file"); 
Group group= new Group();
Scene scene= new Scene(group);
fxpanel.setScene(scene);  

add(fxpanel);
fxpanel.setBounds(0,0,1024,768);
WebEngine eng;
webview = new WebView ();
group.getChildren().add(webview);
webview.setMinSize(500,400);
webview.setMaxSize(500,400);  

webview.setVisible(true);
eng= webview.getEngine();
eng.setJavaScriptEnabled(true);
eng.load(f1.toURI().toURL().toString());

}
 catch(Exception ex)
{ 

  ex.printStackTrace();
}
adesh singh
  • 1,727
  • 9
  • 38
  • 70
  • possible duplicate of [Customize scrolling in JavaFx WebView](http://stackoverflow.com/questions/19312565/customize-scrolling-in-javafx-webview) – jewelsea Oct 11 '13 at 07:58
  • See https://stackoverflow.com/questions/31264847/how-to-set-remember-scrollbar-thumb-position-in-javafx-8-webview – Tillmann Aug 07 '18 at 14:50

0 Answers0