java - "Exception in thread "Animation Thread" error when using Processing in Eclipse -
i have created simple processing sketch in eclipse classes.eclipse says code contains no errors, warnings, fails @ runtime , console displays following errors:
exception in thread "animation thread" java.lang.nullpointerexception @ processing.core.papplet.ellipse(papplet.java:12174) @ assignment.tracking.display(tracking.java:15) @ assignment.assignment.draw(assignment.java:16) @ processing.core.papplet.handledraw(papplet.java:2386) @ processing.core.pgraphicsjava2d.requestdraw(pgraphicsjava2d.java:240) @ processing.core.papplet.run(papplet.java:2256) @ java.lang.thread.run(unknown source)
the code following:
package assignment; import processing.core.*; public class assignment extends papplet { tracking tracking; public void setup() { size(500, 500); tracking = new tracking(); } public void draw() { tracking.display(); } }
and code tracking class is:
package assignment; import processing.core.*; public class tracking extends papplet { int test; public tracking() { test = 100; } void display(){ ellipse(test, test, test, test); } }
i believe have imported necessary processing .jar files. in advance help
it looks problem setup in assignment
class, calls ellipse()
tracking
class. note assignment
, tracking
2 different papplet
s. call size(500, 500)
in assignment
, tracking
has no defined size.
Comments
Post a Comment