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




Have Programming Question? Ask it here!
 
 
 


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


What is source and listener?

Advertisement
View Answers

October 27, 2010 at 4:45 PM


Hi,

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.

Thanks.



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
Advertisements
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. http://www.roseindia.net/java/example/java/swing
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
Change Listener
Java: Change Listener Introduction Listeners and getting the slider value Add a change listener to the slider so that it will be called when the slider is changed. The listener will be called in two situations. It will be called
Action Listener Review
Action Listener Review Many components call an action listener... listener is any object that implements the ActionListener interface... ways to implement action listeners follow. 1. One shared action listener
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 link.here 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
Listeners
Java NotesListeners A listener is called when the user does something... the user interface, they can have other sources (eg, a Timer). Button listener example After a button is created, you will add a listener to it. Eg
@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
Top-level Listeners
Java Notes Top-level Listeners   This is an example of top-level Listeners in Java.   In this example you will learn how to create top level-listeners in swing applications.   Using this as a listener  
Inner-class Listeners
Java NotesInner-class Listeners Named inner class Defining an inner class listener to handle events is a very popular style. Access. Use an inner class... by the listener class. Because simple program listeners typically get or set
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
Anonymous Listeners
class simply to add a listener object to a button.   Java has a somewhat obscure syntax for creating an anonymous innner class listener that implements... Java NotesAnonymous Listeners   Using anonymous inner class listeners
MouseListener
Java NotesMouseListener This type of mouse listener is for events which..., or the mouse enters or leaves the area of the component with a listener. Here... to the upper left corner of the component with the mouse listener. Use
javax.swing.Timer
Java Notesjavax.swing.Timer A javax.swing.Timer object calls an action listener at regular intervals or only once. For example, it can be used to show..., or check a server every hour. Java 2 added another class by the same name
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...://www.roseindia.net/java/master-java/interface.shtml Thanks
java
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
JTree ActionListener Example
JTree ActionListener Example        Introduction  In this section, you will learn about JTree Action Listener and its implementations.  Program Description
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
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
java
, "this" represents the action listener is defined in the same class itself not outside
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
Java Servlet Problem - JSP-Servlet
Java Servlet Problem  I have a servlet class that implemets the ServletContextAttributeListener interface. I am overriding all three methods..., i need atleast one response object, which is not available inside the listener
JAVA - Java Beginners
or sad ? to draw. Java Hint The action listener you produce to respond... this by calling the Java repaint() method. This is a standard Java method that causes
java - Java Interview Questions
to its implementation class object   Hi Friend, In java language... interfaces are Serializable, Clonable, SingleThreadModel, Event listener. Marker...://www.roseindia.net/java/master-java/interface.shtml Thanks
java programming - Java Beginners
java programming  heloo there, hopw all of u guys are fine my question is how to program a atm machine consept by using java ?? im having problem in that to create a program similiar like d atm machine using java.. 
Java how to stop audio
Java how to stop audio  hello i have this code in the main: try { AudioInputStream audio = AudioSystem.getAudioInputStream(new File...... please tell me what should i write in the action listener for the button when i
Java swings - Swing AWT
Java swings  i have the following class .In that class i has two...); MouseListener listener = new DragMouseAdapter(); label1.addMouseListener(listener); label2.addMouseListener(listener); label1.setTransferHandler(new
java
java  diff bt core java and java
java
java  what is java
Java
Java   Whether Java is pure object oriented Language
java
java  different between java & core java
Advertisements
 

 

 

DMCA.com