当前位置:网站首页>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
边栏推荐
- Letter meaning and parameter abbreviation of optical module Daquan
- Kubernets first meeting
- Programmers don't talk about morality, and use multithreading for Heisi's girlfriend
- What are the reasons for the frequent high CPU of ECS?
- 一键过滤选择百度网盘文件
- VB. Net calls ffmpeg to simply process video (class Library-6)
- Win10 clear quick access - leave no trace
- SQL performance optimization skills
- Introduction To AMBA 简单理解
- Halcon图片标定,使得后续图片处理过后变成与模板图片一样
猜你喜欢

How to configure static IP for Kali virtual machine
![[Excel] 数据透视图](/img/45/be87e4428a1d8ef66ef34a63d12fd4.png)
[Excel] 数据透视图
![70000 words of detailed explanation of the whole process of pad openvino [CPU] - from environment configuration to model deployment](/img/3f/36a67544deceb3d3789b500efde89c.jpg)
70000 words of detailed explanation of the whole process of pad openvino [CPU] - from environment configuration to model deployment

如何展开Collapse 的所有折叠面板

A little understanding of GSLB (global server load balance) technology
![BUU-Crypto-[HDCTF2019]basic rsa](/img/d0/8e451dabb2a6897f6680220d16d04d.jpg)
BUU-Crypto-[HDCTF2019]basic rsa

1480. 一维数组的动态和

体验碎周报第 102 期(2022.7.4)

Programmers don't talk about morality, and use multithreading for Heisi's girlfriend

JS扁平化数形结构的数组
随机推荐
AWT介绍
如何展开Collapse 的所有折叠面板
ansys命令
Supplement the JS of a video website to decrypt the video
Basic concept of bus
总线的基本概念
BUU-Reverse-easyre
Excel 比较日器
【无标题】
Actual cases and optimization solutions of cloud native architecture
Kubernets first meeting
配置交叉编译工具链和环境变量
SQL injection - injection based on MSSQL (SQL Server)
JS扁平化数形结构的数组
Overview of relevant subclasses of beanfactorypostprocessor and beanpostprocessor
JS arguments parameter usage and explanation
Talk about the SQL server version of DTM sub transaction barrier function
js获取对象中嵌套的属性值
Qt发布多语言国际化翻译
Halcon图片标定,使得后续图片处理过后变成与模板图片一样