void () { JBCefBrowser browser = JBCefBrowser.createBuilder() .setOffScreenRendering(true) .setOSRHandlerFactory(new JBCefOSRHandlerFactory() { final Rectangle bounds = new Rectangle(1024, 768); @Override public @NotNull Function<JComponent, Rectangle> createScreenBoundsProvider() { return component -> bounds; } }) .setUrl("chrome:version") .build(); invokeAndWaitForLoad(browser, () -> browser.getCefBrowser().createImmediately()); }