当前位置:网站首页>AWT introduction
AWT introduction
2022-07-04 05:53:00 【Gentle ~】
Recommended reading :Java Detailed explanation of graphical interface (AWT、Swing) special column
List of articles
summary
Java Use AWT and Swing Related classes can complete graphical interface programming , among AWT The full name of is abstract window toolset (Abstract Window Toolkit), It is sun The company first provided GUI library , This GUI The library provides some basic functions , But this GUI The function of the library is relatively limited , So later sun The company also provides Swing library . By using AWT and Swing Graphical interface component library provided ,java The graphical interface programming of is very simple , The program only needs to create the required graphic components in turn , And organize these components together in an appropriate way , You can develop a very beautiful user interface .
When JDK 1.0 When it was released , Sun Provides A basic set of GUI Class library , This GUI Class libraries hope to run on all platforms , This basic library is called " Abstract window toolset CAbstract Window Toolkit )", It's for Java The application provides basic graphical components . AWT It's the window frame , It extracts common components from window systems on different platforms , When the program is running , Delegate the creation and actions of these components to the running platform of the program . In short , When using AWT Writing GUI applications when , The program only specifies the location and behavior of interface components , It doesn't provide a real implementation ,JVM Call the operating system local graphical interface to create and platform Consistent counterparts .
Use AWT The created GUI application has the same interface style as the running platform , For example Windows On the operating system , It shows Windows style ; stay UNIX On the operating system , It shows UNIX style . Sun I hope to achieve this in this way " Write Once, Run Anywhere " The goal of .
AWT Inheritance system
All and AWT All programming related classes are placed in the java.awt In the package and its subpackages , AWT There are two base classes in programming :Component and MenuComponent.
Component: Represents one that can be displayed graphically , And can interact with users , for example Button Represents a button ,TextField representative A text box, etc ;
MenuComponent: It represents the menu component of the graphical interface , Include MenuBar ( Menu bar )、 Menultem ( A menu item ) Equal subclass ;

among Container It's a special kind Component, It represents a container , Can hold ordinary Component.
AWT There is also a very important interface called LayoutManager , If there are multiple components in a container , Then the container needs to use LayoutManager To manage the layout of these components .

Recommended reading :Java Detailed explanation of graphical interface (AWT、Swing) special column
边栏推荐
- ansys命令
- Zhanrui tankbang | jointly build, cooperate and win-win zhanrui core ecology
- JS arguments parameter usage and explanation
- Leetcode question brushing record | 206_ Reverse linked list
- Excel comparator
- [excel] PivotChart
- C语言练习题(递归)
- 卸载Google Drive 硬盘-必须退出程序才能卸载
- Component、Container容器常用API详解:Frame、Panel、ScrollPane
- Win10 clear quick access - leave no trace
猜你喜欢

Grounding relay dd-1/60

Gridview出现滚动条,组件冲突,如何解决

js arguments参数使用和详解
![[openvino+paddle] paddle detection / OCR / SEG export based on paddle2onnx](/img/a9/72791cbcc6c9da45e89450ab2820c1.jpg)
[openvino+paddle] paddle detection / OCR / SEG export based on paddle2onnx
![BUU-Crypto-[HDCTF2019]basic rsa](/img/d0/8e451dabb2a6897f6680220d16d04d.jpg)
BUU-Crypto-[HDCTF2019]basic rsa

1480. Dynamic sum of one-dimensional array

Tf/pytorch/cafe-cv/nlp/ audio - practical demonstration of full ecosystem CPU deployment - Intel openvino tool suite course summary (Part 2)

Leakage detection relay jy82-2p

A little understanding of GSLB (global server load balance) technology

Actual cases and optimization solutions of cloud native architecture
随机推荐
fastjson
19.Frambuffer应用编程
BUU-Crypto-[GUET-CTF2019]BabyRSA
C language simple student management system (including source code)
Google Chrome browser will support the function of selecting text translation
C语言练习题(递归)
VB. Net simple processing pictures, black and white (class library - 7)
How to expand all collapse panels
724. 寻找数组的中心下标
Design and implementation of redis 7.0 multi part AOF
Win10 clear quick access - leave no trace
ES6 模块化
Excel 比较日器
Accidentally deleted the data file of Clickhouse, can it be restored?
注释与注解
Arc135 C (the proof is not very clear)
[Excel] 数据透视图
Programmers don't talk about morality, and use multithreading for Heisi's girlfriend
Luogu deep foundation part 1 Introduction to language Chapter 5 array and data batch storage
Sword finger offer II 038 Daily temperature