Results 1 to 4 of 4
- 05-25-2010, 04:57 PM #1
[Solved]Pls check why my code is giving a runtime error
My code compiles ok, but I get errors during runtime. I already spent hours on it but can't seem to figure out why. It is an animation. At first the code ran ok, but there was flickering so I tried to remove it, but when I tried to follow isntructions and remove the flickering of the animation, it gave runtime errors.
Here is WORKING CODE of the animation but with flicker:
Java | import java.awt.*; import jav - Anonymous - 5VwLgwrx - Pastebin.com
Here is code with RUNTIME ERRORS, with attempts to remove flicker:
Java | import java.awt.*; import jav - Anonymous - Fix4t20V - Pastebin.com
EDIT: eclipse said that errors were coming from the update() and paint() methodsLast edited by Beginner; 05-25-2010 at 05:50 PM.
- 05-25-2010, 05:07 PM #2
Senior Member
- Join Date
- Feb 2010
- Location
- Ljubljana, Slovenia
- Posts
- 470
- Rep Power
- 4
You are getting NullPointerExceptions. Check your declaration of the Graphics object.
Ever seen a dog chase its tail? Now that's an infinite loop.
- 05-25-2010, 05:12 PM #3
I don't see anything wrong with it =( any hints?
EDIT: I noticed that init() method was not even called, do you know where I could call it?
EDIT2: Nevermind, solved it myself...Last edited by Beginner; 05-25-2010 at 05:50 PM.
- 05-26-2010, 12:32 AM #4
Similar Threads
-
can somebody check my code
By raven in forum New To JavaReplies: 2Last Post: 08-29-2010, 08:55 PM -
In debug a javabean, how check it is giving to other component CORRECT data-DAO/pools
By lse123 in forum JDBCReplies: 22Last Post: 05-01-2010, 10:52 PM -
giving missing return statement error.due to withdraw method.
By qadeer37 in forum New To JavaReplies: 5Last Post: 01-16-2010, 11:14 PM -
Plz Some one check my code
By TamTam in forum AWT / SwingReplies: 1Last Post: 02-07-2009, 11:24 PM -
Diference Between compiler error Garbage collection and Runtime Error?
By makpandian in forum New To JavaReplies: 3Last Post: 01-23-2009, 08:53 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks