1
   

What's wrong with this program

 
 
NeoGuin
 
Reply Thu 22 Jan, 2004 08:51 am
I'm working on a Java program to do a slide show but I seem to have hit a snag.

The program compiles fine but when I go to try and init the applet I get a java.lang.NullPointerException in this block of code
Code:
String images = getParameter("ImageNames");
StringTokenizer imgTok= new StringTokenizer(images, ",");


And here's what the applet declaration looks like

Code:
<applet code=showDemo width=300 height=400>
<param name=NumImages value='3'>
<param name="ImageNames" value='Img1.foo,Img2.foo,Img3.foo'>
</applet>
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 651 • Replies: 1
No top replies

 
rorwizard
 
  1  
Reply Sun 25 Jan, 2004 05:39 pm
Re: What's wrong with this program
NeoGuin wrote:

Code:
String images = getParameter("ImageNames");
StringTokenizer imgTok= new StringTokenizer(images, ",");



Whats images in the StringTokenizer Declaration?? And are you shure it points to something?

Also does "ImageNames" referr to the paramater u declared in the applet, or is it text, if its a parameter are you sure it should be in qoutes?

Did you compile the project, not only the .java source code?(wat app are u using, or are u doing appletviewer in the command line??)

Can I see the whole code and the error text, I may be able to help you better then?
0 Replies
 
 

Related Topics

Clone of Micosoft Office - Question by Advocate
Do You Turn Off Your Computer at Night? - Discussion by Phoenix32890
The "Death" of the Computer Mouse - Discussion by Phoenix32890
Windows 10... - Discussion by Region Philbis
Surface Pro 3: What do you think? - Question by neologist
Windows 8 tips thread - Discussion by Wilso
GOOGLE CHROME - Question by Setanta
.Net and Firefox... - Discussion by gungasnake
Hacking a computer and remote access - Discussion by trying2learn
 
  1. Forums
  2. » What's wrong with this program
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.04 seconds on 05/14/2024 at 04:24:43