Help me pls !!!

I'm having problems with my applet, it compiles & run successfully with appletviewer. However it wait forever to Loading Applet with the browser.

I have already used the HTML converter 1.3 that i downloaded from Sun's website & Java Plugin 1.3.

Pls help ...

The following is my code:-

import java.awt.*;

import java.lang.*;

import java.applet.*;

import java.net.*;

import javax.swing.*;

import java.awt.event.*;

public class SlideShow extends JApplet implements ActionListener, Runnable {

MediaTracker LoadImages;

Image slides[];

String imagefile, soundfile, type1, caption;

Thread AutoShow;

int images =0, delay=0;

int index = 0;

JButton forward, backward;

JCheckBox auto, sound;

JLabel title;

AudioClip clip;

JPanel marquee, control;

public String[][] getParameterInfo() {

String[][] info = {

{"caption", "string", "Title of the Slide Viewer"},

{"imagefile", "string", "Base Image File Name (ex. picture)"},

{"soundfile", "string", "Sound File Name (ex. audio.au)"},

{"images", "int", "Total number of image files"},

{"delay", "int", "Delay in between images (in ms.)"},

{"type", "str", "Image File Type(gif, jpg, etc)"},

};

return info;

}

public void init() {

LoadImages = new MediaTracker(this);

caption = getParameter("caption");

System.out.println(caption);

imagefile = getParameter("imagefile");

System.out.println(imagefile);

soundfile = getParameter("soundfile");

System.out.println(soundfile);

type1= getParameter("type1");

System.out.println(type1);

images = Integer.valueOf(getParameter("images")).intValue();

System.out.println(images);

slides = new Image[images];

delay= Integer.valueOf(getParameter("delay")).intValue();

System.out.println(delay);

for (int i = 0; i < images; i++) {

slides = getImage(getDocumentBase(), imagefile + i + "." + type1);

System.out.println(slides);

if (i >= 0)

LoadImages.addImage(slides, 1);

}

try {

LoadImages.waitForID(0);

} catch (InterruptedException e) {

System.out.println("Image Loading Failed!");

}

showStatus(imagefile + " Images Loaded");

index = 0;

LoadImages.checkID(1);

clip = getAudioClip(getDocumentBase(), soundfile);

Container contentPane = getContentPane();

getContentPane().setLayout(new BorderLayout());

forward = new JButton("Forward");

forward.addActionListener(this);

backward = new JButton("Backward");

backward.addActionListener(this);

auto = new JCheckBox("AutoCycle Images");

auto.setSelected(true);

sound = new JCheckBox("Sound On");

sound.setSelected(true);

sound.addActionListener(this);

title = new JLabel(caption);

marquee = new JPanel();

marquee.setLayout(new BorderLayout());

marquee.add("North", title);

control = new JPanel();

control.setLayout(new FlowLayout());

control.add(auto);

control.add(sound);

control.add(backward);

control.add(forward);

setFont(new Font("Helvetica", Font.BOLD, 18));

getContentPane().add("South", marquee);

setFont(new Font("Helvetica", Font.PLAIN, 14));

marquee.add("South", control);

}

public void actionPerformed(ActionEvent evt)

{

Object source = evt.getSource();

if (source == forward)

{

index++;

repaint();

}

else if (source == backward)

{

if (index !=0) {

index--;

repaint();

}

}

else if (source == sound)

{

if (sound.isSelected())

clip.loop();

else

clip.stop();

}

}

public void start() {

images = 0;

validate();

repaint();

clip.loop();

AutoShow = new Thread(this);

AutoShow.start();

}

public void stop() {

index = 0;

validate();

repaint();

if (AutoShow!= null) AutoShow.stop();

AutoShow= null;

}

public void run() {

Thread running = Thread.currentThread();

while (AutoShow==running) {

try {

Thread.sleep(delay);

} catch (InterruptedException e) {

break;

}

if (auto.isSelected()) {

if (LoadImages.checkID(1,true))

synchronized (this) {

if (index == (slides.length - 1))

index = 0;

else

index++;

}

invalidate();

validate();

repaint();

}

}

}

public void update(Graphics g) {

try {

paint(g);

validate();

marquee.repaint();

} catch (ArrayIndexOutOfBoundsException e) {

if(index < 0)

index = 0;

else if (index > images)

index = images;

System.out.println("No more Images!");

}

}

public void paint(Graphics g) {

if (LoadImages.isErrorAny()) {

g.setColor(Color.black);

g.fillRect(0, 0, size().width, size().height);

return;

}

g.drawImage(slides[index], 0, 0, this);

validate();

marquee.repaint();

}

}

[5362 byte] By [kkhsum] at [2007-9-26 1:37:58]
# 1

This is the code of the converted HTML file:-

<!--"CONVERTED_APPLET"-->

<!-- CONVERTER VERSION 1.0 -->

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"

WIDTH = 450 HEIGHT = 450 codebase="http://java.sun.com/products/plugin/1.1.1/jinstall-111-win32.cab#Version=1,1,1,0">

<PARAM NAME = CODE VALUE = "SlideShow.class" >

<PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">

<PARAM NAME = "caption" VALUE ="A Sample Photo Album">

<PARAM NAME = "imagefile" VALUE ="image">

<PARAM NAME = "soundfile" VALUE ="song.au">

<PARAM NAME = "images" VALUE ="6">

<PARAM NAME = "delay" VALUE ="5000">

<PARAM NAME = "type1" VALUE ="gif">

<COMMENT>

<EMBED type="application/x-java-applet;version=1.1" java_CODE = "SlideShow.class" WIDTH = 450 HEIGHT = 450 caption = "A Sample Photo Album" imagefile = "image" soundfile = "song.au" images = "6" delay = "5000" type1 = "gif" pluginspage="http://java.sun.com/products/plugin/1.1.1/plugin-install.html"><NOEMBED></COMMENT>

</NOEMBED></EMBED>

</OBJECT>

<!--

<APPLET CODE = "SlideShow.class" WIDTH = 450 HEIGHT = 450 >

<PARAM NAME = "caption" VALUE ="A Sample Photo Album">

<PARAM NAME = "imagefile" VALUE ="image">

<PARAM NAME = "soundfile" VALUE ="song.au">

<PARAM NAME = "images" VALUE ="6">

<PARAM NAME = "delay" VALUE ="5000">

<PARAM NAME = "type1" VALUE ="gif">

</APPLET>

-->

<!--"END_CONVERTED_APPLET"-->

kkhsum at 2007-6-29 2:25:23 > top of Java-index,Archived Forums,Java Programming...