I am trying to open a webpage in webview using javafx . This webpage opens a new popup window when click on a hyperlink
How can i open the new popup , when trying to open the same web page in default web browser like chrome , IE they are opening the pop up.
For creating the pop up i am using the following code.
Group group= new Group();
Scene scene= new Scene(group);
fxpanel.setScene(scene);
WebView webview = new WebView ();
group.getChildren().add(webview);
it().getScreenSize().height);
webview.setVisible(true);
webview.getEngine().setOnAlert(null);
eng= webview.getEngine();
eng.setJavaScriptEnabled(true);
try{
String url ="http://www.lawcrux.com/mkwebchatblog/loginp.aspx";
eng.load(url);
eng.setCreatePopupHandler(
new Callback<PopupFeatures, WebEngine>() {
@Override
public WebEngine call(PopupFeatures config) {
JOptionPane.showMessageDialog(null,"clicked");
return eng;
}
});