I am trying to create a JavaFX application with a WebView that simply loads the "WhatsApp Web" site.
Code
public class Controller implements Initializable {
@FXML
private WebView webView;
@Override
public void initialize(URL location, ResourceBundle resources) {
WebEngine webEngine = webView.getEngine();
webEngine.setJavaScriptEnabled(true);
webEngine.load("https://web.whatsapp.com/");
}
}
When I run the program the following will show up
1. Question Why is this happening? Is there anything Javas WebEngine can't do?
2. Question How can I solve this?
Before someone asks why I would do this, instead of just using my regular browser - simply for fun and to understand how things work.