aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 2711
    
    5

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: 36478
    
  16
Like most things, there is something useful about it in the Java Tutorials.
Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 485
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.
If you understand, say "understand". If you don't understand, say "don't understand". But if you understand and say "don't understand". How do I understand that you understand? Understand!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: listener
 
Similar Threads
Urgent : Are FILTERS in the syllabus.
The Listener In the Tag Library Descriptor
Calling a servlet on startup
JButton disabling mouse listeners
Use stop button to stop moving (stop timers) on JPanel