Layne, If I take the new away from the front of the class loader, I get this:
C:\Documents and Settings\Marcus Laubli>javac Literature\Browser.java
Literature\Browser.java:26: non-static method getResource(java.lang.String) cann
ot be referenced from a static context
ClassLoader.getResource( "Docs//index.html" ) ;
^
1 error
Otherwise, if leave the new in front of ClassLoader, this happens:
C:\Documents and Settings\Marcus Laubli>javac Literature\Browser.java
Literature\Browser.java:28: cannot find symbol
symbol : class getResource
location: class java.lang.ClassLoader
new ClassLoader.getResource "Docs//index.html" ) ;
^
1 error
/** Very simplistic "Web browser" using Swing. Supply a URL on the * command line to see it initially, and to set the destination * of the "home" button. * 1998 Marty Hall, http://www.apl.jhu.edu/~hall/java/ */
Rose, be careful whom you call smart.
If you take a close look at the code above, In the comments, Marty Hall was the one who wrote the code and published it on the web. I just know the functionality I need, searched and found what Marty did, then tried to change it for my use.
I may have been smart to copy,
(that's ok, if you find source code on the web, you can use it, but leave the credits in the comments so that the guy/girl who wrote it really gets the credit for the work) I'm trying to compile after changing ONE LINE, and this time I'm stuck!
[ January 28, 2005: Message edited by: Marcus Laubli ]