Search:

Type: Posts; User: aussiemcgr

Search: Search took 0.16 seconds.

  1. Replies
    13
    Views
    2,991

    Re: problem with drawing images on JPanel

    Your right, that would be the reason. We might be able to fix this though. What if you overroad the update(Graphics g) method instead of the paint(Graphics g) method? In order to prevoke that method,...
  2. Replies
    13
    Views
    2,991

    Re: problem with drawing images on JPanel

    2 things...
    1) Incase you dont already know, when you get a NullPointer like that, the only one we care about is the first occurance because that is the most relevent to what we are doing. The only...
  3. Replies
    13
    Views
    2,991

    Re: problem with drawing images on JPanel

    Then check the GUI like I suggested while you were writing this. If the problem isnt with our set variables, it must be with the GUI.
  4. Replies
    13
    Views
    2,991

    Re: problem with drawing images on JPanel

    You know, your on to something there, infact, the more I look at it, the more GUI problems I'm seeing.

    Snake is a JFrame. So why are we calling Container c = getContentPane();? In fact, Snake...
  5. Replies
    13
    Views
    2,991

    Re: problem with drawing images on JPanel

    Well, we need to figure out where the NullPointers are at. To do this, we either set up a bunch of try/catch statements or throw in a bunch of System.out.println's. I suggest that latter.

    To place...
  6. Replies
    13
    Views
    2,991

    Re: problem with drawing images on JPanel

    um, do you ever set inGame to true? Cause if not, then thats your reason.
Results 1 to 6 of 6