201671010114 2016-2017-2 "Java Programming" 13th Week study Summary

Source: Internet
Author: User

in this week, we learned about event handling, mainly learning about event processing techniques, changing perceptions and actions. Set the button listener class by implementing the listener interface in event processing technology, after the event response is executedActionperformedMethod to implement the operation. Event button listener objects often need to perform actions that may affect other objects, and can strategically place the listener class in the class that needs to modify the state. In the change of perception,SwingProgram UseMetalperception, changing perceptions in two ways. The first way is toJavaInstalled subdirectoriesJre/libthere is a file underswing.properties. In this file, the attributeSwing.defaultlafset to the desired look and feel class name. The second way is to dynamically change perceptions. by callingUimanagerThe method in the class realizes the change of look and feel, and gets the display name of the class name and the look and feel of the implementation class when changing the perception. Combine event response to achieve switching impressions. in the action, eachJComponentThere are three input mappings, one for each mappedKeystrokeobjects are associated with the action. Three input mappings correspond to three different conditions. actionmap Getactionmap ()method returns the mappings for the associated action Map key and the action object. InputMap Getinputmap(int flag) method to obtain an input mapping that maps keys to action keys.

In this test, have mastered the previous learning process has been blurred knowledge points, anonymous inner class do not need a constructor, method of coverage and methods of overloading is now understood. The quiz will give you a better grasp of the vague knowledge of the past.

201671010114 2016-2017-2 "Java Programming" 13th Week study Summary

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.