Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Listern Object Compile error & Method Call

 
capp luckett
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


<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).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic