• Post Reply Bookmark Topic Watch Topic
  • New Topic

Explain how the method is invoked  RSS feed

 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import java.awt.*;
import java.awt.event.*;







How is the mouseclicked method of the class myMouse Listner invoked???
evem though it is not a constructor...
I am sorry if i sound stupid...
Please explain it to me

[edit]Add code tags. CR[/edit]
[ November 05, 2008: Message edited by: Campbell Ritchie ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a public method - it can be invoked from any object that happens to have a reference to the MyMouseListener object.

In the future, please UseCodeTags when posting code of any length. It's unnecessarily hard to read as it is, thus limiting its potential audience.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!