jmonkeyengine - Putting JMEcanvas into JPanel SWING -


i need put jme canvas app jpanel.

in class jme init this:

public jmecanvascontext ctx; public dimension dim = new dimension(800, 600); private void init() {     appsettings settings = new appsettings(true);     settings.setwidth(dim.width);     settings.setheight(dim.height);     // settings.setrenderer(appsettings.lwjgl_opengl1);      setsettings(settings);     createcanvas(); // create canvas!     ctx = (jmecanvascontext) getcontext();     ctx.setsystemlistener(this);      ctx.getcanvas().setpreferredsize(dim);     startcanvas();  } 

then, in main window create jpanel (using netbeans designer tool) , add jme canvas panel.

paneldelagente.add(agentemolon.ctx.getcanvas()); 

but doesntwork. first time use jme , dont know how can put in jpanel

thanks time!

in case use https://github.com/davidb/jme3_ext_swing

the question posted on jme forum : https://hub.jmonkeyengine.org/t/putting-jme-canvas-into-jpanel-swing , more answers.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo