WebClient mozilla api in JME, problem with Canvas?

Hello, I am trying to use WebClient mozilla api in a JME project.



The WebClient API return a Canvas object, but it is not displayed on the screen.

All Swing/AWT components are displayed except the Canvas (code is working out of JME).


browserControlCanvas  = (Canvas) webBrowser.queryInterface(BrowserControl.BROWSER_CONTROL_CANVAS_NAME);

jBrowserPanel.add(browserControlCanvas, BorderLayout.CENTER);



I am a JME beginner, may be I need to use a JMECanvas? In this case how to convert the Canvas in JMECanvas? You have any other ideas?

That seems to be not possible.

http://www.jmonkeyengine.com/jmeforum/index.php?topic=5553.0



It is really a pity because integrating WebClient in JME would be really powerful, a great step for the virtual world  :D, I’ll dig it deeper tonight (GMT +1)…

FWIW, I have been able to make use on a JEditorPane to render web contents in jME (although it was not using JMEDesktop)

I found more info :

http://wiki.netbeans.org/wiki/view/EmbeddedBrowser



WebClient is based on embedding XULRUnner in a so called heavyweight component such as java.awt.Canvas.

But JMEDesktop is only working with lightweight components.

http://java.sun.com/products/jfc/tsc/articles/mixing/#differences



I am not sure that I understood everything, if a solution exist it is probably too complicated for me.  :oops:



I will try to find something else …