I just added maven dependency for jcef browser to my java 1.7 project and try to load my html String on the browser. But when browser executed, my html dont show. By the way when i right click on the browser and choose view source, i can see my html code. Here is my implementation;
- Code: Select all
final CefSettings settings = new CefSettings();
settings.windowless_rendering_enabled = false;
final CefApp cefApp = CefApp.getInstance(settings);
final CefClient client = cefApp.createClient();
final CefBrowser browser = client.createBrowser(
"data:text/html,<html><body>test text</body></html>",
useOSR,
false);
final Component browserUI = browser.getUIComponent();
getContentPane().add(browserUI, BorderLayout.CENTER);
pack();
setSize(1000, 600);
this.setVisible(true);
Thanks.