Java 应用与开发 - Java GUI 编程
典型组件(课后自学) 学习目标 1. 了解用 Java 开发桌面软件图形用户界面的常用工具集 2. 掌握 AWT 的常用组件和视觉控制 3. 深入理解 GUI 事件处理机制 4. 了解 Applet,特别是其历史渊源,了解与 Applet 类似的技 术 5. 理解 Swing 和 AWT 的关系,学习使用 Swing 的典型组件 构建较复杂的图形界面程序 大纲 GUI 组件及布局 GUI 事件处理 Swing 典型组件(课后自学) 大纲 GUI 组件及布局 GUI 事件处理 Applet Swing Swing 典型组件(课后自学) 用 Java 构建图形界面,我们有什么选择? ▶ AWT ▶ Swing ▶ Java FX ▶ 多语言混合开发 大纲 GUI 组件及布局 GUI 事件处理 Applet Swing Swing 典型组件(课后自学) 接下�� GUI 组件及布局 (Graphical User Interface),Java 主要分为 AWT 和 Swing 两大系列 GUI API。 O 抽象窗口工具集 AWT (Abstract Window Toolkit) O 相关软件包 java.awt 包 提供基本 GUI 组件、视觉控制和绘图工具 API。 java.awt.event 包 提供 Java GUI 事件处理 API。 大纲 GUI0 码力 | 73 页 | 876.31 KB | 1 年前3《Java 应用与开发》课程讲义 - 王晓东
114 10.2 线程安全 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 11.1 AWT 组件和容器层次架构 . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 11.2 组件定位参照系 . . . . . . . . . . . . 32 4.2 类成员的访问控制 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 11.1 AWT 常用的组件和容器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 11.2 GUI 事件及相应监听器接口 . . . JDK API 中的常用包如表所示。 表 4.1 JDK API 常用包 包名 功能说明 包的含义 java.lang Java 语言程序设计的基础类 language 的简写 java.awt 创建图形用户界面和绘制图形图像的相关类 抽象窗口工具集 java.util 集合、日期、国际化、各种实用工具 utility 的简写 java.io 可提供数据输入/输出相关功能的类 input/output0 码力 | 330 页 | 6.54 MB | 1 年前3Java 应用与开发 - 线程编程
线程控制 线程的同步 后台线程 GUI 自动创建的线程 ▶ AWT-Windows 线程 负责从操作系统获取底层事件通知,并将之发送到系统事件 队列(EventQueue)等待处理。在其他平台上运行时,此线 程的名字也会作相应变化,例如在 Unix 系统则为 “AWT-Unix”。 ▶ AWT-EventQueue-n 线程 ▶ AWT-Shutdown 线程 ▶ DestroyJavaVM 线程 线程基础 线程控制 线程的同步 后台线程 GUI 自动创建的线程 ▶ AWT-Windows 线程 ▶ AWT-EventQueue-n 线程 也称事件分派线程,该线程负责从事件队列中获取事件,将 之分派到相应的 GUI 组件(事件源)上,进而触发各种 GUI 事件处理对象,并将之传递给相应的事件监听器进行 处理。 ▶ AWT-Shutdown 线程 ▶ DestroyJavaVM 线程 大纲 自动创建的线程 ▶ AWT-Windows 线程 ▶ AWT-EventQueue-n 线程 ▶ AWT-Shutdown 线程 负责关闭已启用的抽象窗口工具,释放其所占用的资源,该 线程将等到其他 GUI 线程均退出后才开始其清理工作。 ▶ DestroyJavaVM 线程 大纲 线程基础 线程控制 线程的同步 后台线程 GUI 自动创建的线程 ▶ AWT-Windows 线程0 码力 | 82 页 | 1010.73 KB | 1 年前3Jenkins System Information
Value awt.toolkit sun.awt.windows.WToolkit executablewar C:\Users\MarkE\Downloads\jenkins.war file.encoding Cp1252 file.encoding.pkg sun.io file.separator \ java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment Win32GraphicsEnvironment java.awt.headless true java.awt.printerjob sun.awt.windows.WPrinterJob java.class.path Downloads\jenkins.war java.class.version 52.0 java.endorsed.dirs C:\Program Files\Java\jre10 码力 | 5 页 | 122.16 KB | 1 年前3JAVA 应用与开发 - 控制台应用程序设计
System.out.println("App01␣is␣running..."); 4 } 5 } CODE ± TestApp02.java 1 import java.awt.*; 2 import java.awt.event.*; 4 public class TestApp02 { 5 public static void main(String[] args) { 6 Frame0 码力 | 63 页 | 2.84 MB | 1 年前3Introducing Apache Wicket
in terms of components and containers, just like AWT does with desktop windows. Both frameworks share the same component-based architecture: in AWT we have a Windows instance which represents the physical0 码力 | 53 页 | 1.85 MB | 1 年前3Apache Wicket 8.x Reference Guide
pages in terms of components and containers, just like AWT does with desktop windows. Both frameworks share the same component-based architecture: in AWT we have a Windows instance which represents the physical Component. Wicket pages can be composed (and usually are) by many components, just like AWT windows are composed by Swing/AWT components. Both frameworks promote the reuse of presentation code and GUI elements0 码力 | 350 页 | 9.95 MB | 1 年前3Apache Wicket 7.x Reference Guide
pages in terms of components and containers, just like AWT does with desktop windows. Both frameworks share the same component-based architecture: in AWT we have a Windows instance which represents the physical Component. Wicket pages can be composed (and usually are) by many components, just like AWT windows are composed by Swing/AWT components. Both frameworks promote the reuse of presentation code and GUI elements0 码力 | 346 页 | 10.00 MB | 1 年前3Apache Wicket 10.x Reference Guide
pages in terms of components and containers, just like AWT does with desktop windows. Both frameworks share the same component-based architecture: in AWT we have a Windows instance which represents the physical Component. Wicket pages can be composed (and usually are) by many components, just like AWT windows are composed by Swing/AWT components. Both frameworks promote the reuse of presentation code and GUI elements0 码力 | 336 页 | 7.16 MB | 1 年前3Apache Wicket 9.x Reference Guide
pages in terms of components and containers, just like AWT does with desktop windows. Both frameworks share the same component-based architecture: in AWT we have a Windows instance which represents the physical Component. Wicket pages can be composed (and usually are) by many components, just like AWT windows are composed by Swing/AWT components. Both frameworks promote the reuse of presentation code and GUI elements0 码力 | 335 页 | 7.15 MB | 1 年前3
共 38 条
- 1
- 2
- 3
- 4