Originally posted by bongadi:
He is talking about Anonymous inner (nested) class here.
These are used (traditionally) to add the action listner
for the components.
Example:
Here I am adding an actionListner to the button searchButton.
<pre>
<code>
searchButton.addActionListener ( new ActionListener() {
public void actionPerformed ( ActionEvent e ) {
PerformSomeAction();
}
});
</code>
</pre>
The "new" in the code is to instantiate an inner class
with no name (anonymous inner class) which is implementing
ActionListener() interface.
So, you can have any custom component generating custom events
with a customized method to add listners for thoes events.[/B]
[This message has been edited by bongadi (edited April 21, 2000).]
[This message has been edited by bongadi (edited April 22, 2000).]