JCEF and Applet

Having problems with building or using the JCEF Java binding? Ask your questions here.

JCEF and Applet

Postby jimi » Wed Mar 18, 2015 5:51 am

I'm trying to embed JCEF inside an java fx applet.
Code: Select all
public class MyFxApplet extends Application {
..
..
      browser = cef_client.createBrowser("http://myurl"
                    true,
                    false,
                    );

Than
Code: Select all
 SwingNode swingNode = new SwingNode();
        SwingUtilities.invokeAndWait(() -> {
            final JPanel panel = new JPanel();
            panel.add(browser.getUIComponent(), BorderLayout.CENTER);
            browser.setFocus(true);
            panel.setSize(500, 500);
            swingNode.setContent(panel);

        });

        primaryStage.setScene(new Scene(new javafx.scene.Group(swingNode), W, H));


I don’t have any error, but the browser is not visible, the question are:
Can I put the browser inside an JPanel?
Is there another way to show JCef browser inside an FX applet?
Is my code wrong?
Thank you!
jimi
Newbie
 
Posts: 2
Joined: Thu Mar 12, 2015 9:49 am

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 13 guests