Hi, Happy New Year. I've an applet which accesses some local files for display in a JEditorPane. I've also used both getCodeBase() and getDocumentBase() before for these purposes (as well as hard-coded a few url's. I believ I understand it well, but now I have getCodeBase() working in one applet but not compiling in another applet, with this compile time error: cannot resolve symbol method getCodeBase() location class ExplanatoryText ...java.net.URL url = new java.net.URL(getCodeBase() + "junk.html");
Following is the code snippet which doesn't compile (why?)
And yet in so many of my other applets, they work well, like this little demo of mine that I use as a sort of template for other applets...
This work well. Can someone shed some light on this seeming inconsistency for me please. TIA :-)
humanum errare est.
posted 16 years ago
Hi, it does now, I was extending the wrong class, should have extended JApplet. Was a long programme, can miss a lot of things. Sorry for taking up your time.