Java applet Getting Started 9

zhaozj2021-02-11  196

Getting started with Java Applet

YY435

Pacific Network Academy

Third day

Java graphical interface and design

Graphics User Interface, referred to as a graphics, using graphics, with standard interface elements and mouse operations such as menus, buttons, help users easily send instructions, start operations, and start the system The graph is displayed to the user. The graphical user interface screen is vivid, easy to operate, and the user must remember the trouble of various commands, which is very popular with users, has become the current standard of almost all applications. So learning and developing a graphical user interface is a lesson for application software developers.

The various elements and components constituting the user interface in Java can be roughly divided into three categories: containers, control components, and user-defined components.

Container

The container is a unit used to organize other interface components and elements. Generally speaking, a graphical user interface of an application first corresponds to a complex container, such as a window. This container will contain many interface components and elements, which can also be a container, which will further include its interface components and elements, which constitute a complex graphics interface system according to a subkey.

The main role and characteristics of the container are:

(1) The container has a certain range. General containers are rectangular, and the container range boundaries can be out of the frame, and some are no visible tags.

(2) The container has a certain location. This location can be an absolute position of the screen quadrangular, or may be relative positions relative to other container borders.

(3) The container usually has a background, which covers all containers, which can be tomb, or a special pattern can be specified to make the interface vivid and personalized.

(4) The container can contain many other interface components and elements. When the container is opened, the components and elements are also displayed simultaneously, and when the container is turned off and hidden, the components and elements it contains together are also hidden.

(5) The container can physically arrange the elements contained in a certain rule, such as the relative positional relationship of these elements, and their front-rear arrangement relationship, and the like.

(6) The container may be included in other containers.

2. Control components

Unlike the container, the control component is one of the minimum units of the graphical user interface. It no longer contains other components. The role of the control component is to complete an interaction with the user, including a command to accept the user, accept the user's text input , Display a piece of text or a graphic to the user. To a certain extent, the control component is the result of the standardization of graphical user interface. The currently common control components are:

(1) check box (Checkbox)

(2) radio button (CheckboxGroup or Radiobutton)

(3) drop-down list (list or choice)

(4) Tag (Label)

(5) Text editing area (Edit or TextField, Textarea)

(6) button (Button)

3. User custom ingredients

In addition to the standard graphical interface element, the programmer can also design some user-defined graphical interface components according to the user, such as drawing some geometric graphics, using a logo pattern, etc. User-defined ingredients can only be used and recognized and recognized as a standard interface element, so it is usually only used to decorate, beautify, and cannot respond to user actions, not interactive.

转载请注明原文地址:https://www.9cbs.com/read-4742.html

New Post(0)