This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes listener Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "listener" Watch "listener" New topic
Author

listener

sandeep Talari
Ranch Hand

Joined: Dec 24, 2007
Posts: 63
summary regarding "Listeners" . What are these Listeners in java . What is the main purpose these Listeners. What i have to understand blindly about listeners. Explain me in details
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

A listener is a class which is notified when the event it is listening to occurs.
Find out more at the ServletsFaq.




Hope this helps .


SCJP, SCWCD.
|Asking Good Questions|
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Originally posted by sandeep Talari:
summary regarding "Listeners" . What are these Listeners in java . What is the main purpose these Listeners. What i have to understand blindly about listeners. Explain me in details


This question is more like Java Beginner

and a googled it, you ll find hundreds of useful links !!
[ July 17, 2008: Message edited by: Bear Bibeault ]

[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Rahul Shilpakar
Ranch Hand

Joined: Aug 29, 2006
Posts: 132
Listeners are always ready to listen any event happen on its components and its changes.


Perform for today. Adapt for tomorrow.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38513
    
  23
Like most things, there is something useful about it in the Java Tutorials.
Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 492

In simple (few)words i try to answer of What are these Listeners in java? I read it in J2CR(Java 2 The Complete Reference)book.
First we should understand event:- An Event is an object that describes a state change in a source. & A Source is an object that generates an event.
A source must register listeners in order for the listeners to receive notifications about a specific type of event.
Here is the general form:-
public void add Type Listener(TypeListener el)
here Type is the name of event & el is La reference to the event listener.
The listener is an object that is notified when an event occurs.
I not write all things here but
try these link:-
{Listeners in Java}.
{Listeners in Java}.


Millions saw the apple fall, but Newton asked why.
 
jQuery in Action, 2nd edition
 
subject: listener