|
INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: What is the difference between the JDK 1.02 event model and the eventdelegationmodelintroduced with JDK 1.1
Answer: The JDK 1.02 event model uses an event inheritance or bubbling approach. In this model,components arerequired to handle their own events. If they do not handle a particular event, the event isinherited by (orbubbled up to) the component's container. The container then either handles the event orit is bubbled up toits container and so on, until the highest-level container has been tried.In the event-delegation model, specific objects are designated as event handlers for GUIcomponents.These objects implement event-listener interfaces. The event-delegation model is moreefficient than theevent-inheritance model because it eliminates the processing required to support thebubbling of unhandledevents.
|
|
|
Category |
Java Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 6754 users |
Added on |
7/15/2011 |
Views |
69628 |
Rate it! |
|
|
Question:
What is the difference between the JDK 1.02 event model and the eventdelegationmodelintroduced with JDK 1.1
Answer:
The JDK 1.02 event model uses an event inheritance or bubbling approach. In this model,components arerequired to handle their own events. If they do not handle a particular event, the event isinherited by (orbubbled up to) the component's container. The container then either handles the event orit is bubbled up toits container and so on, until the highest-level container has been tried.In the event-delegation model, specific objects are designated as event handlers for GUIcomponents.These objects implement event-listener interfaces. The event-delegation model is moreefficient than theevent-inheritance model because it eliminates the processing required to support thebubbling of unhandledevents. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the relationship between a method's throws clause and the exceptionsthat can bethrown during
|
View Answer
|
|
If a class is declared without any access modifiers, where may the class beaccessed
|
View Answer
|
|
What is the advantage of the event-delegation model over the earlier eventinheritancemodel
|
View Answer
|
|
Which Container method is used to cause a container to be laid out andredisplayed
|
View Answer
|
|
In which package are most of the AWT events that support the event-delegationmodel defined
|
View Answer
|
|
Can an anonymous class be declared as implementing an interface andextending a class
|
View Answer
|
|
Which method of the Component class is used to set the position and size of acomponent
|
View Answer
|
|
Which characters may be used as the second character of an identifier, but notas the firstcharacter of an identifier
|
View Answer
|
|
Is null a keyword
|
View Answer
|
|
What are the similarities and differences between Java and C/C++?
|
View Answer
|
|
Describe java's security model.
|
View Answer
|
|
What is the difference between an Applet and an Application?
|
View Answer
|
|
How can you force all derived classes to implement a method present in the base class?
|
View Answer
|
|
What are abstract classes, abstract methods?
|
View Answer
|
|
What's the difference between == and equals method?
|
View Answer
|
|
Describe, in general, how java's garbage collector works?
|
View Answer
|
|
What is the difference between StringBuffer and String class?
|
View Answer
|
|
How can you achieve Multiple Inheritance in Java?
|
View Answer
|
|
What are the main differences between Java and C++?
|
View Answer
|
|
In Java, You can create a String object as: String str = "abc"; & String str = new String("abc");Why
|
View Answer
|