Java basic graphical interface and IO system

Source: Internet
Author: User

1,java Interface System

Event driver Programming: An event source that generates an event and triggers his component to be called the event source.

Event Listener, registration and event processing, event monitoring classification: the GUI program itself to implement monitoring, using member internal monitoring, anonymous internal monitoring, the most used or anonymous internal implementation of monitoring;

Event Adapter: Using an adapter can reduce the programmer's code volume. Model: Separating the model and controller is advantageous to multiple models to share a set of data;

2,I/O system

Classification of streams: input and output streams, node flows, and processing streams;

File class: Divided into Byte stream, character stream; Byte stream is divided into low-level byte stream and high-level byte stream; Advanced byte stream is divided into 3 categories (Filter stream class, buffer stream, data stream, etc.);

Streams are mainly used to read files and write files, and the main use is to use Java and exelce combination. Control execle through Java.

The stream can also be used as a simulation database for storing data (combined with execle use);

This week the main perfect ATM interface and data storage, QQ interface design and improvement.

This object is not a member of the flow system, it encapsulates a byte stream, and also encapsulates a buffer (a character array), manipulating the data in a character array with an internal pointer. The object features:

  1. The object can only manipulate files, so the constructor receives two types of parameters: A. string file path; B.file object.

  2. The object can read and write to the file, and can specify the mode of operation when the object is instantiated (R,RW)

Note: When the object is instantiated, it is created automatically if the file to be manipulated does not exist, and if the file exists, the write data does not specify a location and is written from scratch, overwriting the original content. Can be used for multithreaded downloads or for multiple threads to write data to a file at the same time.

Java basic graphical interface and IO system

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.