How to obtain/initialize renderer

Can someone explain to me how renderer can be obtained/initialized when I don't use createWindow() method from DisplaySystem class. I read that this render object is initialized during creating window, how should I initialize this renderer object when I want SWING to create window for me ?  


I use Swing window is created JMECanvas also, but I have no access to the renderer object which I need to handle Camera and other things. In debug mode I noticed that renderer object is nulled. It is never initialized. When I glanced at the code I saw that renderer Object is only created during executing createWindow method or createHeadlessWindow method of DisplaySystem Class. Should I create this renderer by myself and set it manually if I use JMECanvas with Swing ?

Hmmm am I missing something ? I am new to 3d programming any help will be appreciated :slight_smile:  

I found some method in DisplaySystem for initialization DisplaySystem for Applet, is some method for initiazlization available for Swing GUI ? or should I maybe inherit from LWJGLDisplaySystem and add method InitForSwing?

InitForApplet :

     * Initializes the displaysystem for use in Applets.
     * @param w width of the applet
     * @param h height of the applet
    public void initForApplet(int w, int h) {
       width = w;
       height = h;
        renderer = new LWJGLRenderer(w, h);
        created = true;

If someone could tell me if I am going in the right direction ... and if so then explain above code, especially what for are switchContext method, renderersetHeadless(false), and setupRecords and updateStates methods

Thanks in advance :)