GUI component

GUI component

How can a GUI component handle its own events?
View Answers

October 26, 2010 at 4:56 PM

Hi,

Here is the answer,

A GUI component handles its events by implementing the required event listener interface.It adds its own event listener in order to keep a track of all events associated with it.AWT has Java1.0 and Java1.1 of Event handling in different manners: In Java1.0:Event handling is based on inheritance.A program catches and processes GUI events by subclassing GUI components and override either action() or handleEvent() methods.There are two possibilities in this scenario:

a)Each component is subclassed to specifically handle its target events. The results in too many classes.

b)All events or a subset for an entire hierarchy for handling a particular container; results in container's overridden action() or handleEvent() method and complex conditional statement for events processing.

Thanks.









Related Tutorials/Questions & Answers:
GUI component
GUI component  How can a GUI component handle its own events
Component gui - Java Beginners
Component gui  Can you give me an example of Dialog in java Graphical user interface?  Hi friend, import javax.swing.*; public class DialogPaneDemo { public static void main(String[] args
Advertisements
GUI
GUI  How to GUI in Net-beans ... ??   Please visit the following link: http://www.roseindia.net/java/java-tips/background/30java_tools/netbeans.shtml
GUI
GUI  Write a GUI application for the WebBuy Company that allows a user to compose the three parts of a complete email message: the â??To:â??, â??Subject:â?? and â??Message:â?? text. The â??To:â??, and â??Subject:â?? Text areas
GUI framework
GUI framework  what do u mean by GUI framework
Convert the code to GUI
GUI code  GUI code
gui question
gui question  design a gui application for me and write its code in which the user enters a no. in a textfield and onn clicking the button the sum of the digits of the no. should be displayed. hint: suppose the user enters 12
GUI problem
GUI problem  Create a class called CDProgram and write a GUI program to compute the amount of a certificate of deposit on maturity. The sample data follows: Amount deposited: 80000.00 Years: 15 Interest Rate: 7.75 Hint
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 entered value in first textfield(jtext1) and pressed the enter key . the cursor
Convert the code to GUI
GUI Application example  GUI Application example
Convert the code to GUI
GUI Example  GUI Example code to learn
Version of gj-gui>gj-gui dependency
List of Version of gj-gui>gj-gui dependency
Java GUI
Java GUI  1) Using Java GUI, create a rectangular box that changes color each time a user click a change color button. 2) Modify Question 1 to include a new button named insert image, that allow user to insert a bitmap image
Web component
Web component  Is HTML page a web component
Java component
Java component  What is the preferred size of a component
sql component
sql component  is sql package is the component of jdbc
Convert the code to GUI
Java GUI Class Example  Java GUI Class Example
Convert the code to GUI
GUI Java JSP application  GUI Java JSP application
Convert the code to GUI
GUI Application Development   GUI Application Development
Convert the code to GUI
Java and GUI application Example  Java and GUI application Example
Convert the code to GUI
Write a GUI Application  best way to write a GUI based application
Convert the code to GUI
How to Convert the code to GUI   How to convert a code into GUI
gui question
gui question  design a gui application and write code to accept a string from the user in a textfeild and print using option pane whether it is a palindrome or not. hint: abba is a palindrome   import java.awt.*; import
GUI problem
GUI problem  How do I make a Jbutton which is shaped like a circle. This button needs to be clicked in order to change color.   import java.awt.*; import java.awt.geom.*; import javax.swing.*; public class
Convert the code to GUI
Java Code to GUI   can any one convert My code to GUI code
Netbeans GUI Ribbon
Netbeans GUI Ribbon  how to create ribbon task in java GUI using netbeans
Convert the code to GUI
How to create GUI application in Java   How to create GUI application in Java
ModuleNotFoundError: No module named 'gui'
ModuleNotFoundError: No module named 'gui'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'gui' How to remove the ModuleNotFoundError: No module named 'gui' error
Convert the code to GUI
Is it possible to convert a code into GUI  Is it possible to convert a code into GUI
Java GUI - Java Beginners
Java GUI  HOW TO ADD ICONS IN JAVA GUI PROGRAMMES
Convert the code to GUI
Convert the code   How to convert a code to GUI look alike
Container or Component - Java Beginners
about the realtionship between Components and Containers in Java GUI? 1) a component is a subclass of a container which means any container can hold a component 2) a component is allowed to hold other components including containers. 3
how to refresh my GUI page
how to refresh my GUI page  how to refresh a GUI in java
Version of excalibur-component>excalibur-component dependency
List of Version of excalibur-component>excalibur-component dependency
Regarding GUI Applications
Regarding GUI Applications  How to create a save and open jmenu item in java desktop application
Magic Matrix in GUI
Magic Matrix in GUI  I want program in java GUI contain magic matrix for numbers
MXML component
MXML component  Hi..... Please tell me about that prob When I set visible=?false?, the component still takes up space and appears in the tab order. Why is that? Thanks  Ans: You can often achieve the "display
Component in actionscript
Component in actionscript  Hi...... Have you built any components with actionscript? If so explain how you did it? please give me the example for that....... ThanksADS_TO_REPLACE_1   Ans: CityComboBox.as package
Artifacts of gj-gui
List of Artifacts of gj-gui maven depenency
Java component class
Java component class  Which method of the Component class is used to set the position and size of a component
Maven Repository/Dependency: gj-gui | gj-gui
Maven Repository/Dependency of Group ID gj-gui and Artifact ID gj-gui. Latest version of gj-gui:gj-gui dependencies. # Version Release Date You can read more at: Maven Tutorials
Flex SDK GUI
Flex SDK GUI  Hi....... please give me ans of this question.. What classes do you typically extend in the Flex SDK for creating GUI controls and why? Thanks
GUI application program
GUI application program  Write a GUI application program that meets the following requirements: Create an array with 100 randomly chosen integers. Create a textfield to enter an array index and another textfield to display
Java GUI - Java3D
Java GUI  1) Using Java GUI, create a rectangular box that changes color each time a user click a change color button. 2) Modify Question 1 to include a new button named insert image, that allow user to insert a bitmap image
Maven Dependency gj-gui >> 0.1
You should include the dependency code given in this page to add Maven Dependency of gj-gui >> gj-gui version0.1 in your project
What is component mapping in Hibernate?
What is component mapping in Hibernate?  Hi, What is component mapping in Hibernate? thanks
java gui-with jscroll pane
java gui-with jscroll pane  Dear friends.. I have a doubt in my gui application. I developed 1 application. In this application is 1 Jscrollpane of height 600 and width 400. Normally it is showing 200 height and 400 width
java gui-with jscroll pane
java gui-with jscroll pane  Dear friends.. I have a doubt in my gui application. I developed 1 application. In this application is 1 Jscrollpane of height 600 and width 400. Normally it is showing 200 height and 400 width
ModuleNotFoundError: No module named 'component'
ModuleNotFoundError: No module named 'component'  Hi, My Python... 'component' How to remove the ModuleNotFoundError: No module named 'component' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'argus-gui'
ModuleNotFoundError: No module named 'argus-gui'  Hi, My Python... 'argus-gui' How to remove the ModuleNotFoundError: No module named 'argus-gui' error? Thanks   Hi, In your python environment you

Ads