aspose file tools*
The moose likes Beginning Java and the fly likes Listern Object Compile error & Method Call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Listern Object Compile error & Method Call" Watch "Listern Object Compile error & Method Call" New topic
Author

Listern Object Compile error & Method Call

capp luckett
Ranch Hand

Joined: Dec 07, 2000
Posts: 33
Hi;
I have been struggling hours over these errors from JDK1.3.1 compile. One is where I am trying to create an object and
instanciate to the Applet by calling the constructor for the Applet. The second error, I think, is related. If the rectangle
contains the x,y points clicked, I want to call a calculation
method. I appreciate any clues or suggestions.
Code in trouble is:

Error for the Listern is:
java:44: cannot resolve symbol
symbol : constructor MouseClickedListener (Minesweeper)
location: class MouseClickedListener
MouseClickedListener myListener = new MouseClickedListener(this);
==================================
The other error is:
C:\SitePadPro\Documents\Java\Project3\Minesweeper.java:133: cannot resolve symbol
symbol : method bombYorN (int)
location: class MouseClickedListener
bombYorN(b);
^
[This message has been edited by Marilyn deQueiroz (edited October 06, 2001).]


flodin
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12


<pre>
Error for the Listener is:
java:44: cannot resolve symbol
symbol : constructor MouseClickedListener (Minesweeper)
location: class MouseClickedListener
MouseClickedListener myListener = new MouseClickedListener(this);
</pre>
Kind of hard to say since you are not showing us line 44 containing the code where the error occurs:
"MouseClickedListener myListener = new MouseClickedListener(this);"

My best guess is that you are calling a constructor containing one parameter (this) but the constructor you have provided above has two parameters ( Minesweeper & int ). Not a match. Therefore an error.

==================================
<pre>
The other error is:
C:\SitePadPro\Documents\Java\Project3\Minesweeper.java:133: cannot resolve symbol
symbol : method bombYorN (int)
location: class MouseClickedListener
bombYorN(b);
^
</pre>

You are calling a method bombYorN( b ). Where do you declare the method you are calling?

[This message has been edited by Marilyn deQueiroz (edited October 07, 2001).]


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Listern Object Compile error & Method Call