im so annoyed

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
laura
Posts: 1
Joined: Wed Oct 22, 2003 3:12 am

im so annoyed

Post by laura »

I have only ONE java file open.. an applet. Sometimes when I go to "run applet" it brings up the choose file dialog and only lets me pick from one file, an .html file that is also in the folder that contains another applet. So I can't run the other applet (BarChart.java). Repeating this process sometimes gets the applet I want to run, but sometimes not. And other times I can pick the file I want (the temp .html file). Recompiling, closing all other documents, restarting the program doesn't help.

See images:
http://bluepapaya.net/images/choosefile.jpg
When I dont have a choice

http://bluepapaya.net/images/choosefile2.jpg
When I do
jer029
Posts: 1
Joined: Sun Oct 26, 2003 7:21 pm

Re: I'm so annoyed

Post by jer029 »

Textpad will list the Htm and Html files that are in the initial directory setting (which is defaulted to the directory of the document currently displayed when you click "run applet"). If you have not created an HTML file (necessary to run an applet) in the same folder that where your applet class resides, then TextPad will create one automatically, hence your second image2 showing the cryptic file "tp0145b5.html".

Whether textpad can actually run your applet depends on the complexity of the applet, and even if you have correctly coded your applet. It is probably best to create your own html file for your applet and give it a comparable name (related to your java class file, so you know what you are actually running. If nothing shows up, you probably have errors in your code that prevents it from doing what you expect it to. At that point I would suggest you review the Java Console of Internet Explorer which will show you error messages as to where in your program the java VM choked on your code.

Hope this helps,

John Rogers
jrogers@pclink.com
Post Reply