Meaningless Drivel is fun!*
The moose likes Applets and the fly likes url problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "url problem" Watch "url problem" New topic
Author

url problem

Samarth Barthwal
Greenhorn

Joined: Feb 16, 2006
Posts: 23
hello everybody,
I made the following applet but it gives me 3 error for the variable url1.why is it so?





I get the following errors:

1. url is already defined in init().
2. cannot find symbol variable getDocumentBase.
3. cannot find symbol url1.
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
The error messages are very much self-explanatory. Aren't they?

1. url is already defined in init().
You are tyring to define a variable called url twice, which is illegal.


Rename it to url1, this will solve problems (1) & (3)

2. cannot find symbol variable getDocumentBase.
getDocumentBase() is a method. So the proper way to call it is


Mani
Quaerendo Invenietis
Samarth Barthwal
Greenhorn

Joined: Feb 16, 2006
Posts: 23
thanks Mani
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: url problem
 
Similar Threads
using graphics object
Using arrays to randomly generate images? (applet)
connecting servlet from applet
placing images in applets
LOADING .TIFF IMAGES INTO AN APPLET