Awesome attitude. Your problem was that you were trying to call a method that hadn't been declared, which probably meant you needed to be using an instance of some class that did contain that method....
Type: Posts; User: KevinWorkman
Awesome attitude. Your problem was that you were trying to call a method that hadn't been declared, which probably meant you needed to be using an instance of some class that did contain that method....
Calm down. That tutorial tells you exactly how to declare a method.
If you want to call a method that's in another class, you need an instance of that class. What class's getWidth() and...
Recommended reading: Defining Methods (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
No, you didn't. You're calling it. But where is it declared? What methods do you expect to be called when the code reaches that line?
That's a different exception from before. Now it's telling you that it can't find getWidth() or getHeight(). That makes sense, because neither method is declared in your SlidingBlockModel.
Okay, so now what error are you getting?
Sorry, but they are not in the code you posted. That's what's causing the Exception. I don't really know what to tell you if I'm not looking at the same code as you.
The error is pretty self-explanatory: what are w and h? Where are you declaring them?