java - rendering problems with netbeans -
i'm having issues running program on netbeans. says,
uncompilable source code - cannot find symbol symbol: class renderer location: class box
i know code runs because saw professor run on cmd, when tried run on netbeans wouldn't let me. sorry if sound noobish, started learning java. downloaded rendering file , extracted on cmd line. downloaded file used on command line don't know how import netbeans. appreciated!
public class box { public box() { x = 25; y = 25; width = 20; height = 30; rotation = 0; name = "none"; visible = true; if (canvas == null) // drawing canvas = new renderer(); } public box(int top, int left, int w, int h, int r, string n) { x = left; y = top; width = w; height = h; rotation = r; name = n; visible = true; if (canvas == null) // drawing canvas = new renderer(); } public void draw() { canvas.add(x, y, width, height, rotation, name, visible); // drawing canvas.render(); // drawing } private int x; private int y; private int width; private int height; private int rotation; private string name; private boolean visible; private static renderer canvas; // drawing } public class usebox { public static void main(string[] args) { box amanda = new box(); amanda.draw(); int x = 100; int y = 100; int width = 20; int length = 30; int degreesrotated = 0; box joe = new box(x, y, width, length, degreesrotated, "joe"); joe.draw(); box meg = new box(150, 150, 20, 30, 45, "meg"); meg.draw(); } }
Comments
Post a Comment