AWT generated before Java swing

Source: Internet
Author: User
(1) Events (event): Describes the object in which an event occurs;

(2) event Source: event generator; (3) Event Handlers: Method for accepting event objects, interpreting event objects, and processing user interactions; (4) event model of jdk1.1; delegate model; event listener: class that implements the listener interface. A listener object is an instance of the class that implements the special listener interface; The event sources and event handlers are separated;When the button event is triggered by an action event, if the button registers an event listener, it will be handled by the actionperform event listener in the event listener; ----- "event processor; as you can see, the delegate model separates the event source and event processing. (5) The Listener interface is in Java. AWT. in the event package; (6) Create a listener class implementation interface windowlistener; we need to implement the methods in this interface, of course, this interface has many methods, so we can create an adapter class, this class is abstract, it implements all the methods in windowlistener, but it is a null implementation, So we declare the adapter class as an abstract, because if it is not abstract, we can construct it, it makes no sense to construct it, because the methods in implementing windowlistener in it are empty implementations, so the adapter class is declared as abstract;(7) four containers are required to use four layout managers. (8) Click the event: actionevent. the corresponding listener is actionlistener. does the actionlistener interface have an adapter class? There is one of its methods: actionreceivmed. It does not have the corresponding adapter class; keylistener/windowlistener/mouse listener also has the corresponding adapter class; but why does it not?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.