2012-03-10, 08:41 PM
MoldyBunny Wrote:-snip-
That gives me:
Code:
Exception in thread "main" java.lang.NullPointerException
at Tower.addDisc(Tower.java:11)
at TOHModel.<init>(TOHModel.java:10)
at TOHFrame.<init>(TOHFrame.java:7)
at TOHApp.main(TOHApp.java:5)
Java Result: 1Which indicates there is a problem with Tower.
I wish I learned objects more in depth.
s is null according to the debugger, but I thought having
Code:
private Stack s;
public void Tower(){
s = new ArrayListStack();
}EDIT:
GOT IT.
I had public void Tower(), should be public Tower().
Derp mistake.
I WILL BE UPDATING THIS THREAD WITH MORE PROBLEMS, THOUGH. Thanks guys!
now to figure out how to paint the discs

