THIS means that THIS class will be the ActionListener for that button. You
will therefore have to have an actionPerformed method within the class to
handle any events coming from that button. This is VERY different from the
way things were done in Java 1 and, in my experience, far more
efficient. Although, a little confusing at first. Stick with it...

-- 
Save the whales. Collect the whole set.
[EMAIL PROTECTED]        http://homepage.ntlworld.com/pogden

On Thu, 5 Oct 2000, Nicolas Raitman wrote:

> Hi to all. I am very lost with handling events in Java, so I have some
> questions, suppose I have this:
> It is an applet. Of course, most of the code has been omitted.
> 
> public void init()
> {
> 
> Button button1;
> button1 = new Button("OK")
> 
> add(button1);
> button1.addActionListener(this); // in the first place, what does this
> 'THIS' mean ?
> }
> 
> 
> 
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to