In some cases (e.g. automation testing) you might need to block current thread execution and wait until web page is loaded completely. JxBrowser API provides functionality that allows doing it. The following sample code demonstrates how to load http://www.google.com web page and wait until it's loaded completely: 

// Blocks current thread execution and waits until http://www.google.com web page is loaded completely
Browser.invokeAndWaitFinishLoadingMainFrame(browser, new Callback<Browser>() {
    @Override
    public void invoke(Browser value) {
        value.loadURL("http://www.google.com");
    }
});

 Note: use this method for loading web pages only.