JApplet - maintaining state?

Dear users,

I'm am developing a JApplet with two JPanels on it. One of the panels has buttons and a textarea on it, and the other one is where i do some painting. It works wonderfully on my local machine. However, i have some problems when deploying it on a web server.

As this applet reads certain files on the server before getting started, i had signed the applet properly and have uploaded it. It does not throw any exceptions and loads properly, meaning that it is able to read the files it wants. But while painting, i check if one of the hashtables has atleast one record in it. if it has, painting will proceed. if it doesnt, an error string will be painted on the JPanel. And now, my problem is, even with correct input (which is likely to put a couple of entries in the hashtable), my applet shows the error string.

while debugging, i tried to populate the textarea with the contents of one of the files i'm trying to read. and this does not happen either. no exceptions are thrown. i'm lost.

please have a look at this to know what i'm talking about

http://www.mrc-lmb.cam.ac.uk/genomes/pkota/ncit/SliceIt.html

my misery doesnt end here. when i scroll down the page, even the error string that is getting painted, disappears. how do i block that call to repaint() and maintain the so-called "state" ?

any help is greatly appreciated.

kota.

[1409 byte] By [kotaonlinea] at [2007-11-27 3:21:02]
# 1
> > As this applet reads certain files on the server> before getting started, i had signed the applet> properly and have uploaded it. It does not throw anyHow do you read the files on the server ? Are you sure the files are loaded ?
KlausJJa at 2007-7-12 8:23:47 > top of Java-index,Desktop,Core GUI APIs...
# 2
HiFirst of all, thanks for the reply. and sorry about the delayed response. i read the files using getCodeBase(). i made sure all the files are in the code base directory and i am not sure what's happening after that.
kotaonlinea at 2007-7-12 8:23:47 > top of Java-index,Desktop,Core GUI APIs...
# 3

getCodeBase() returns only the URL where the applet classes are located. But how do you download the data files ? With Applet.getImage() or HttpURLConnection ?

If the applet works locally I recommend to put some debug messages (with System.out.println() ) in your code and activate the Java console for the Java plugin to find the problem.

KlausJJa at 2007-7-12 8:23:47 > top of Java-index,Desktop,Core GUI APIs...