wood burning stoves 2.0*
The moose likes Java in General and the fly likes Unable to Resolve Symbol Errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Unable to Resolve Symbol Errors" Watch "Unable to Resolve Symbol Errors" New topic
Author

Unable to Resolve Symbol Errors

A McDonald
Greenhorn

Joined: Dec 10, 2002
Posts: 2
I'm trying to convert and application class (Frame) to an Applet. I have a fairly well defined set of steps to use to do this. After the first round of edits, I tried to compile and got a bunch of Unable to Resolve Symbol errors for library functions as well as for package level classes. I can still compile the original class, and I changed no code on the lines in the edited version that produce the errors. And the imports are still there...I don't understand how the same lines can compile in one class, but not in another...
Brian McCallister
Greenhorn

Joined: Dec 03, 2002
Posts: 19
This question is a bit too vague. It is fairly easy to lose symbol references - especially if you change the base class of somehting from a JFrame to an Applet and start calling Swing related methods on it.
-Brian
A McDonald
Greenhorn

Joined: Dec 10, 2002
Posts: 2
Ok...since I did change the base class from Frame to Applet, and now am having this problem, do you have any suggetions? I'm not calling any new library methods, I just added an init() method and made a few other minor changes...
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
We would need to see the code.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Andy, I can not tell from the 1200 lines of code that you sent me which lines that you changed, and I do not have a clue WHICH classes are being flagged in your error messages. Needless to say, I can not compile your code since I do not have all of the classes that it relies on.
Remember that Frame extends Window and therefore inherits all the methods of Window.
Applet extends Panel. While both Window and Panel are Containers they have different methods etc.
That is the first place that I would look for a problem.
For instance setMenuBar(MenuBar mb) is a method of Frame. It just does not exist in Applet so you can not call it.
Also a call to super must be the first line of a constructor. Obviously you can not call the Frame super constructor if this is an Applet. You are trying to set the title for this Applet, however a title is a thing that an outer Container like a Window or a Frame has. Panels and Applets are inner Containers and do not HAVE things like titles, minimize buttons, their own menubars etc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to Resolve Symbol Errors
 
Similar Threads
Compilation Problem
how can do I run this java code and pass the pdf file ?
HF p176 example compile error
unnable to create object of a class..
please help