Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Problem with 3D in processing and java

$
0
0
Hi everyone! 
I've a problem with processing: when I try to compile this code
  1. package prove;
  2. import javax.swing.JFrame;
  3. import processing.core.*; 



  4. /**
  5.  *
  6.  * @author Famiglia
  7.  */
  8. public class Prove  extends PApplet{
  9.     public void setup() {
  10.   size(640, 360, OPENGL);
  11. }

  12.     public void draw() {
  13.   background(0);
  14.   camera(mouseX, height/2, (height/2) / tan(PI/6), width/2, height/2, 0, 0, 1, 0);
  15.   translate(width/2, height/2, -100);
  16.   stroke(255);
  17.   noFill();
  18.   box(200);
  19. }

  20.     static public void main(String[] passedArgs) {
  21.         JFrame newJFrame = new JFrame();
  22.         newJFrame.setSize(400,400);        
  23.         Prove p = new Prove();
  24.         newJFrame.setContentPane(p);
  25.         p.init();
  26.         newJFrame.setVisible(true);
  27.     }
  28. }
It gives me this error:
  1. Exception in thread "Animation Thread" java.lang.NoSuchMethodError: javax.media.opengl.awt.GLCanvas.removeGLEventListener(Ljavax/media/opengl/GLEventListener;)Ljavax/media/opengl/GLEventListener;
  2. at processing.opengl.PGL.initSurface(PGL.java:584)
  3. at processing.opengl.PGraphicsOpenGL.initPrimary(PGraphicsOpenGL.java:5836)
  4. at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1606)
  5. at processing.core.PApplet.run(PApplet.java:2140)
  6. at java.lang.Thread.run(Thread.java:662)
I've imported all libraries  (JOGL + core), can't find the error! please help!


Viewing all articles
Browse latest Browse all 1768

Trending Articles