Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.11 seconds.

  1. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    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....
  2. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    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...
  3. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    Recommended reading: Defining Methods (The Java™ Tutorials > Learning the Java Language > Classes and Objects)
  4. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    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?
  5. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    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.
  6. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    Okay, so now what error are you getting?
  7. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    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.
  8. Replies
    15
    Views
    4,040

    Re: Java sliding block puzzle issues

    The error is pretty self-explanatory: what are w and h? Where are you declaring them?
Results 1 to 8 of 8