Latest Tutorials| Questions and Answers|Ask Questions?|Site Map


View Questions and Answers by Category


Have Programming Question? Ask it here!

Java listener
1 Answer(s)      4 years and 3 months ago
Posted in : Java Interview Questions

What is source and listener?

View Answers

October 27, 2010 at 4:45 PM


Here is the answer,

Source: A source is an object that generates an event.this occurs when the internal state of that object changes in some way.

Listener: A listener is an object that is notified when an event occurs.It has two major requirements,

First, it must have been registered with one or more sources to receive notifications about specific types of events.

Second, it must implement methods to receive and process these notifications.


Related Tutorials/Questions & Answers:
Java listener
Java listener  What is source and listener
Java event-listener
Java event-listener  What is the relationship between an event-listener interface and an event-adapter class
Java Printer Listener - Java Beginners
Java Printer Listener  I want some programs to make listener for all... for java applications i want printer listener for all applications in the system... for more information.
Event listener in JavaScript with example
Event listener in JavaScript with example  What is event listener in JavaScript? Can anyone please post an example of Event listener?? Thanks in Advance
Listener ports - JMS
Listener ports  I am getting the following error on my server. Please...] 00000150 MDBListenerIm I WMSG0043I: MDB Listener CLSMGUncorrelatedMDBListenerPortA...:25:392 CST] 000000b8 MDBListenerIm I WMSG0042I: MDB Listener
Listener ports - JMS
Listener ports Error in JMS  Hi, I am getting an listener ports error in JMS. Does anyone have solution
httpsession listener - JSP-Servlet
httpsession listener  i want to see the example of httpsession listener where it is counting how many times the session has been created
dynamically add listener to a SWT widget
dynamically add listener to a SWT widget  hello, I am using SWT... as we do in gmail,and there should be a listener for every is the code...;"); attachLink.addListener(SWT.Selection, new Listener() { public void handleEvent
Listener refused the connectio n with the following error
Listener refused the connectio n with the following error  Hi..... Exception in thread "main" java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know
Value Change Event Listener
Value Change Event Listener   ... to use only one listener for the component but second way permits you to include... is called when the ValueChangeEvent action observed by this listener occurs. So
Action Event Listener
Action Event Listener   ... listener for the component but second way permits you to include more than one...;ActionBean": /*Action listener method*/ public void
Java - Event Listeners Example in Java Applet
listener is the feature of java that handles the several events for the several... Java - Event Listeners Example in Java Applet  ... listener and to perform appropriate tasks. In this example the 
Phase Listener
Phase Listener          JSF life-cycle includes six phases... phase events by defining a Phase Listener class as below. The class should
How to handle the text using Key Listener Interface
How to handle the text using Key Listener Interface       In this section, you will learn how to handle the text using the key events on the Java Awt component. All the key events
@WebListener Annotation Servlet Example
the difference is in the implementation of listener in servlet in older version and servlet 3.0 (Java EE6). The example given below will demonstrate you how to implement a listener interface in servlet. In this example I will use
J2ME Record Listener
J2ME Record Listener      ... events from a record store. The Record Listener interface having the following...;REC_STORE = "LISTENER";   public void 
Flex KeyboardEvent Listener
Flex KeyboardEvent Listener       Example below demonstrates the working of KeyboardEvent... and ctrl which when pressed together opens a web page url. Also listener for keys
java programs
java programs  1.define frame? 2.what is the need for java programming? 3.list the events of classes? 4.define Event handling? 5.List event listener interface
J2ME Item State Listener Example
J2ME Item State Listener Example       In this application we are going to shows how to implement...;}   };   form.setItemStateListener(listener);    
Flex Add Event Listener example
in the example we have two event listener Handler and Handler1 respectively
Java Ivent Handler - Swing AWT
Java Ivent Handler  Is it possible to make two listeners work simultaneously?I used a keyboard listener to detect key press and also a mouse listener to detect different events generated by mouse.But when the mouse is moving
JDBC RowSet Example
to use resultSet as java beans object. It can be one bean that makes available... listener is given below, To run this example at first create a database name...) { // TODO Auto-generated method stub System.out.println("Cursor Moved Listener
Listeners - Java Beginners
Listeners  can u get me the code for Window listener and Text Listener and Component Listener?  Hi friend, Code for Window listener...(String args[]) { JFrame jf = new JFrame("Window Listener
java gui
java gui   friends... good day.. i have doubt in java gui. ? i created 1 java gui application. That has two text fields jtext1,jtext2. case: user... use from the action listener of jtext1 to happen like
core java - Java Beginners
; Hi friend, Marker Interface : In java language programming... are Serializable, Clonable, SingleThreadModel, Event listener. Marker Interfaces...:// Thanks
JTree ActionListener Example
JTree ActionListener Example        Introduction  In this section, you will learn about JTree Action Listener and its implementations.  Program Description
Event Adapters
. That is some of the listener interfaces contain more than one method. For instance... method bodies. Generally an adapter class is there for each listener interface... the implementation of all the methods of the listener interface. The following example
Event Handling In Java
Event Handling In Java In this section you will learn about how to handle events in Java. Events in any programming language specifies the external effects... received from the network or it may be something else. In Java when you works
java  what is marker interface?   Interfaces with no methods is known as marker interfaces. Marker interfaces are Serializable, Clonable, SingleThreadModel, Event listener. Marker Interfaces are implemented
Java/PHP Developer
Java/PHP Developer  Hello sir, Am working on playing audio... button = new JButton("Select File"); ActionListener listener = new...); } } } }; button.addActionListener(listener); getContentPane().add(button, BorderLayout.NORTH