I am trying to open a html file using webview in JavaFX. When I'm resizing the window there is no word wrap. Here is my code:
WebEngine xwebEngin=null;
Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
Group gp=new Group();
Scene scn=new Scene(gp);
fm1.setScene(scn);
WebView wb=new WebView();
gp.getChildren().add(wb);
wb.setMaxSize(screenSize.width-20,screenSize.height-70);
wb.setMinSize(screenSize.width-20,screenSize.height-70);
xwebEngin=wb.getEngine();
File htmlFile = new File("d:/new folder/abc.htm)";
try {
xwebEngin.load(htmlFile.toURI().toURL().toString());
}
catch(Exception ex) {}