Posted on
JxBrowser 7.7
We are excited to introduce you JxBrowser 7.7! This update is a new spin in the history of the library. In this version we introduce the pure SWT BrowserView control for the SWT/Eclipse RCP applications.
SWT
The library now provides the pure SWT com.teamdev.jxbrowser.view.swt.BrowserView control that can be embedded into the
SWT/Eclipse RCP applications.
Here is a simple example that demonstrates how to use the SWT BrowserView in a simple SWT application:
import static com.teamdev.jxbrowser.engine.RenderingMode.HARDWARE_ACCELERATED;
import com.teamdev.jxbrowser.browser.Browser;
import com.teamdev.jxbrowser.engine.Engine;
import com.teamdev.jxbrowser.engine.EngineOptions;
import com.teamdev.jxbrowser.view.swt.BrowserView;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public final class HelloWorld {
    public static void main(String[] args) {
        // Creating and running Chromium engine.
        Engine engine = Engine.newInstance(
                EngineOptions.newBuilder(HARDWARE_ACCELERATED).build());
        Browser browser = engine.newBrowser();
        // Loading the required web page.
        browser.navigation().loadUrl("https://html5test.teamdev.com");
        Display display = new Display();
        Shell shell = new Shell(display);
        shell.setText("JxBrowser SWT");
        shell.setLayout(new FillLayout());
        // Creating SWT component for rendering web content loaded 
        // in the Browser instance.
        BrowserView view = BrowserView.newInstance(shell, browser);
        view.setSize(800, 600);
        shell.pack();
        shell.open();
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }
        // Closing the engine and releasing all allocated resources.
        engine.close();
        display.dispose();
    }
}

Eclipse RCP
The SWT toolkit is often used in Eclipse RCP applications, so we prepared a
short tutorial describing how to use the JxBrowser
SWT BrowserView in an Eclipse RCP application.
JsFunction
The JsFunction class has been restored in
the JavaScript-Java Bridge API. Now you can work with the
JavaScript functions directly from the Java code and pass the reference to a function from JavaScript to Java and vice
versa. For example:
JsObject window = frame.executeJavaScript("window");
if (window != null) {
    JsFunction alert = frame.executeJavaScript("window.alert");
    if (alert != null) {
        alert.invoke(window, "Hello world!");
    }
}
Improvements
- The web pages are now being loaded two times faster, than in the previous versions due to the improvements in the loading time and the memory usage in the Chromium processes.
 - JxBrowser now supports Firebase Cloud Messaging.
 - The WebAssembly support is added.
 - With this version you can render the HTML 
<datalist>tag on the web pages. - The web form autofill functionality is now disabled by default.
 - You can now drag and drop files, images, text to and from the Swing/JavaFX 
BrowserViewcomponent on Linux, since the Drag and Drop functionality limitations in both rendering modes have been removed. - Since JxBrowser only supports the 64-bit version of Linux, it now throws an exception, upon an attempt to be run on
Linux 32-bit. This is done by the new 
Environment.checkEnvironment()method responsible for detecting this unsupported environment. 
Fixed issues
- The Swing 
BrowserViewcomponent not being visible when embedded intojavax.swing.JAppletwhen the hardware accelerated rendering mode is enabled. - The internal test resources excluded from the JAR files.
 - Setting focus to Swing 
BrowserViewvia mouse click not clearing the focus from the currently focused Swing component on Windows. - The 
IllegalArgumentExceptionerror when displaying SwingBrowserViewin the hardware accelerated rendering mode on Windows. - Double content rendering when Swing 
BrowserViewis embedded intoJScrollPanein the off-screen rendering mode on Windows. - Freeze on closing 
Browserduring active repainting on the loaded web page in the off-screen rendering mode. - Swing application not receiving focus after clicking the JavaFX 
BrowserViewembedded intoJFXPanelin the hardware accelerated rendering mode on Windows. - Google reCAPTCHA not receiving focus via the 
Tabkey. - The inability to type anything in the text fields located inside an 
IFRAMEon a web page in the off-screen rendering mode. - Closing the window where the 
BrowserViewcomponent is embedded leading to closing allBrowserinstances in the off-screen rendering mode on Windows. - Freeze on closing 
Enginein the off-screen rendering mode on Windows and Linux because of timings. - Freeze on closing 
Engineafter unsubscribing from getting theBrowserClosedevents on Windows and Linux. - Chromium crash when loading the 
chrome://settingsweb page. This web page is disabled now. - The 
ClassCastExceptionerror when the SwingBrowserViewcomponent is embedded intoJDialogand file download has been initiated. - A single-pixel white vertical line in the fullscreen mode on Linux in the hardware accelerated rendering mode.
 - Chromium log files being created in the directory with the Chromium binaries on macOS when the engine has crashed or unexpectedly terminated.
 - The white angles inside the 
BrowserViewcomponent on Ubuntu in the hardware accelerated rendering mode. 
Download JxBrowser 7.7
Please share your email with us, and we'll send you download instructions.
We were unable to send the email. Please use the direct link to download JxBrowser.
If you are a registered customer you don't need to do anything to use this update.
If you would like to evaluate the product, you need an evaluation license.
Follow @JxBrowser to get notified of the library updates.
Subscribe to our RSS feed to get instant updates on new releases.
Subscribe to get notifications about the latest releases.