From: PrinceN on
what class is the actionlistener under??

import java.event.*;????
From: John B. Matthews on
In article
<0213eb3a-42d6-4d83-ad9b-670fe7e3d604(a)g19g2000yqc.googlegroups.com>,
PrinceN <princennamdi(a)gmail.com> wrote:

> what class is the actionlistener under??
>
> import java.event.*;????

java.awt.event.ActionListener

<http://java.sun.com/javase/6/docs/api/java/awt/event/ActionListener.html>

See also javax.swing.event.EventListenerList

<http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/javax/swing/event/EventListenerList.html>

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
From: Lew on
PrinceN wrote:
> what class is the actionlistener [sic] under??
>
> import java.event.*;????

First of all, it's 'ActionListener'.

Second of all, you can find all this in mere moments by looking up the
Javadocs. That's what they're for.
<http://java.sun.com/javase/6/docs/api/>
specifically,
<http://java.sun.com/javase/6/docs/api/java/awt/event/ActionListener.html>

Third of all, 'ActionListener' isn't "under" a class. It is an interface that
is a member of a package. Some of the subinterfaces and subclasses
(collectively, subtypes) are listed in the Javadocs for the interface, though
of course you can (and sometimes should) create your own implementation.

--
Lew
From: PrinceN on
On Jul 26, 1:53 pm, Lew <no...(a)lewscanon.com> wrote:
> PrinceN wrote:
> > what class is the actionlistener [sic] under??
>
> > import java.event.*;????
>
> First of all, it's 'ActionListener'.
>
> Second of all, you can find all this in mere moments by looking up the
> Javadocs.  That's what they're for.
> <http://java.sun.com/javase/6/docs/api/>
> specifically,
> <http://java.sun.com/javase/6/docs/api/java/awt/event/ActionListener.html>
>
> Third of all, 'ActionListener' isn't "under" a class.  It is an interface that
> is a member of a package.  Some of the subinterfaces and subclasses
> (collectively, subtypes) are listed in the Javadocs for the interface, though
> of course you can (and sometimes should) create your own implementation.
>
> --
> Lew

Thanks all...
From: Roedy Green on
On Mon, 26 Jul 2010 04:40:40 -0700 (PDT), PrinceN
<princennamdi(a)gmail.com> wrote, quoted or indirectly quoted someone
who said :

>what class is the actionlistener under??
>
>import java.event.*;????

If you use a relatively advanced IDE, it will insert the imports for
you.

see http://mindprod.com/jgloss/ide.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

You encapsulate not just to save typing, but more importantly, to make it easy and safe to change the code later, since you then need change the logic in only one place. Without it, you might fail to change the logic in all the places it occurs.