java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at java.util.Vector.elementAt(Vector.java:245)
at Animation.run(Animation.java:38)
at java.lang.Thread.run(Thread.java:294)
with the following HTML:
<applet code="Animation.class" width="100" height="100">
<param name="image0" value="3.gif">
<param name="image1" value="2.gif">
<param name="image2" value="1.gif">
<param name="image3" value="0.gif">
<param name="delay" value="1000">
</applet>
As you can see, I'm not a pro when it comes to analyzing Java's cryptic
error messages.
You can view the applet's code at
http://www.superior.net/~tmcguire/Animation.java
Check it out, and if you can help me, please do so ASAP!
\^^^^^^^^/
(.) (.)
--------------------------.oooO-- (__) --Oooo.----------------------------
N Y Y A N K E E S - - C H A M P I O N S
! ________ /`|`\ +------------------------------------+
! _....._/|__|____\..___../ | | | Tim McGuire |
<|~oooo _____ c===-|---+ tmcg...@superior.net |
!\...___/~~~~~\_____..___---.|,/ | http://www.superior.net/~tmcguire/ |
! / |~~|__..-` 0 +------------------------------------+
< | "I believe it's time for me to fly..."
(o) -REO Speedwagon
Tim McGuire <tmcg...@superior.net> wrote in article
>
> java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
> at java.util.Vector.elementAt(Vector.java:245)
> at Animation.run(Animation.java:38)
> at java.lang.Thread.run(Thread.java:294)
>
The problem is an uninitialised vector, by the way, as explained in
previous reply
Whenever I have done applets, I have written the html like this:
Notice the difference in where the quote marks are:
<applet code="Animation.class" width=100 height=100>
<param name=image0 value="3.gif">
<param name=image1 value="2.gif">
<param name=image2 value="1.gif">
<param name=image3 value="0.gif">
<param name=delay value="1000">
</applet>
Second, the error message here is actually quite helpful
since it gives you line numbers in source which for me
is usually enough to spot the error. Since my browser does not
have a goto line number function, I will not take the time
to count it out; you can do this. It is line #38 in your
code. If that is not enough, then just look further at
line 245 in Vector.java.
--
Greg Turner, Intelligent Software
Box 1506 gtu...@hooked.net
Mill Valley, CA 94942 http://www.hooked.net/~gturner/