Cannot resolve AWTGLCanvas

Hi everyone, I just return to JME development this morning and I'm already stuck. I wanted to compile one of my old project and I couldn't. I have been searching for the solution for a number of hours and I finally realized where the problem could come from. My project use Swing to integrate Jme in a canvas and it was fully functionnable last time I work on it. The problem come where I try to do different things on my canvas…creation seem ok but after that many methods are hidden.



Then, I got the idea of trying with JMESwingTest to see what is the source of the problem. I can run without any difficulty JMESwingTest from my jme project…but when I copy/paste it into my second project, surprise, I got the same error. The problem is that the project cannot resolve AWTGLCanvas which is required by LWJGLCanvas. Does anyone have an idea?



Here is the code:


            canvas = (LWJGLCanvas)display.createCanvas(width, height);   //ok
            canvas.setUpdateInput(true);               //ok
            canvas.setTargetRate(60);               //ok

            // add a listener... if window is resized, we can do something about
            // it.
            canvas.addComponentListener(new ComponentAdapter() {   //The method is undefined for LWJGLCanvas

I have tried to move my project in JME folder an everything is working perfectly. But seriously I don't want to have to create everything in the JME folder because of this problem. I going to stay near in the possibility of someone finding the solution.

I think it's a classpath problem. The AWTGLCanvas is inside the "lwjgl.jar" archive. Do you use any IDE? If so, check if the libraries/dependencies folder of your project contains the lwjgl.jar jar file.

pgi said:

I think it's a classpath problem. The AWTGLCanvas is inside the "lwjgl.jar" archive. Do you use any IDE? If so, check if the libraries/dependencies folder of your project contains the lwjgl.jar jar file.


...

I can't believe this was actualy my problem. I just add the lwjgl.jar to my project and it work. Thank, but I feel ashame to have struggle that much time on a so simple problem.