Problem with 3D in processing and java
in
Core Library Questions
•
4 months ago
Hi everyone!
It gives me this error:
I've a problem with processing: when I try to compile this code
- package prove;
- import javax.swing.JFrame;
- import processing.core.*;
-
-
-
- /**
- *
- * @author Famiglia
- */
- public class Prove extends PApplet{
- public void setup() {
- size(640, 360, OPENGL);
- }
-
- public void draw() {
- background(0);
- camera(mouseX, height/2, (height/2) / tan(PI/6), width/2, height/2, 0, 0, 1, 0);
- translate(width/2, height/2, -100);
- stroke(255);
- noFill();
- box(200);
- }
-
- static public void main(String[] passedArgs) {
- JFrame newJFrame = new JFrame();
- newJFrame.setSize(400,400);
- Prove p = new Prove();
- newJFrame.setContentPane(p);
- p.init();
- newJFrame.setVisible(true);
- }
- }
- Exception in thread "Animation Thread" java.lang.NoSuchMethodError: javax.media.opengl.awt.GLCanvas.removeGLEventListener(Ljavax/media/opengl/GLEventListener;)Ljavax/media/opengl/GLEventListener;
- at processing.opengl.PGL.initSurface(PGL.java:584)
- at processing.opengl.PGraphicsOpenGL.initPrimary(PGraphicsOpenGL.java:5836)
- at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1606)
- at processing.core.PApplet.run(PApplet.java:2140)
- at java.lang.Thread.run(Thread.java:662)
I've imported all libraries (JOGL + core), can't find the error! please help!
1