Java 应用与开发 - Java GUI 编程jpg) ## 学习目标 1. 了解用 Java 开发桌面软件图形用户界面的常用工具集 2. 掌握 AWT 的常用组件和视觉控制 3. 深入理解 GUI 事件处理机制 4. 了解 Applet,特别是其历史渊源,了解与 Applet 类似的技术 5. 理解 Swing 和 AWT 的关系,学习使用 Swing 的典型组件构建较复杂的图形界面程序 ## 大纲 GUI 组件及布局 GUI Java 构建图形界面,我们有什么选择? AWT ▶ Swing ▶ Java FX 多语言混合开发 ## 接下来 GUI 组件及布局 GUI 事件处理 Applet Swing Swing 典型组件(课后自学) ## 概念和术语 ## 图形用户界面 GUI (Graphical User Interface), Java 主要分为 AWT 和 Swing 两大系列 GUI API。 API。 ## 抽象窗口工具集 AWT (Abstract Window Toolkit) ## 相关软件包 java.awt 包 提供基本 GUI 组件、视觉控制和绘图工具 API。 java.awt.event 包 提供 Java GUI 事件处理 API。 ## 组件和容器 组件 组件(Component)是图形用户界面的基本组成元素,凡是能够以图形化方式显示在屏幕上并能够与用户进0 码力 | 73 页 | 876.31 KB | 2 年前3
《Java 应用与开发》课程讲义 - 王晓东Apple I ..... 95 9.7 科幻定影中的计算机 ..... 96 10.1 集合相关 API 的关系 ..... 114 10.2 线程安全 ..... 117 11.1 AWT 组件和容器层次架构 ..... 128 11.2 组件定位参照系 ..... 130 11.3 容器默认布局管理器 ..... 132 11.4 事件处理机制示例 ..... 135 .... 11 2.3 Java 语言的关键字(保留字) ..... 14 4.1 JDK API 常用包 ..... 32 4.2 类成员的访问控制 ..... 37 11.1 AWT 常用的组件和容器 ..... 129 11.2 GUI 事件及相应监听器接口 ..... 136 11.3 常用的 GUI 事件适配器 ..... 137 22.1 Java EE 监听器接口和监听器事件 表 4.1 JDK API 常用包 |包名|功能说明|包的含义| |---|---|---| |java.lang|Java 语言程序设计的基础类|language 的简写| |java.awt|创建图形用户界面和绘制图形图像的相关类|抽象窗口工具集| |java.util|集合、日期、国际化、各种实用工具|utility 的简写| |java.io|可提供数据输入/输出相关功能的类|input/output0 码力 | 330 页 | 6.54 MB | 2 年前3
Java 应用与开发 - 线程编程自动创建的线程 ## AWT-Windows 线程 负责从操作系统获取底层事件通知,并将之发送到系统事件队列(EventQueue)等待处理。在其他平台上运行时,此线程的名字也会作相应变化,例如在 Unix 系统则为“AWT-Unix”。 AWT-EventQueue-n 线程 AWT-Shutdown 线程 ▶ DestroyJavaVM 线程 ## GUI 自动创建的线程 AWT-Windows AWT-Windows 线程 AWT-EventQueue-n 线程 也称事件分派线程,该线程负责从事件队列中获取事件,将之分派到相应的 GUI 组件(事件源)上,进而触发各种 GUI 事件处理对象,并将之传递给相应的事件监听器进行处理。 AWT-Shutdown 线程 ▶ DestroyJavaVM 线程 ## GUI 自动创建的线程 AWT-Windows 线程 AWT-EventQueue-n 线程 线程 AWT-Shutdown 线程 负责关闭已启用的抽象窗口工具,释放其所占用的资源,该线程将等到其他 GUI 线程均退出后才开始其清理工作。 ▶ DestroyJavaVM 线程 ## GUI 自动创建的线程 AWT-Windows 线程 AWT-EventQueue-n 线程 AWT-Shutdown 线程 ▶ DestroyJavaVM 线程 在所有其他用户线程退出后,负责释放任意线程所占用系统资源并卸载0 码力 | 82 页 | 1010.73 KB | 2 年前3
Jenkins System Information↓|Value| |---|---| |awt.toolkit|sun.awt.windows.WToolkit| |executable-war|C:\\Users\\MarkE\\Downloads\\jenkins.war| |file.encoding|Cp1252| |file.encoding.pkg|sun.io| |file.separator|\\| |java.awt.graphicsenv|sun graphicsenv|sun.awt.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:\\Program0 码力 | 5 页 | 122.16 KB | 2 年前3
Apache Wicket 10.x Reference Guidepages 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 (pictures, buttons, forms, etc...). |Java.awt.Component|Java.awt.Component + java.awt.Component|org.apache.wicket.Component| |---|---|---| |\+ add(in c: java.awt.Component)|\+ add(in c: org.apache.wicket 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 | 2 年前3
Apache Wicket 9.x Reference Guidepages 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 (pictures, buttons, forms, etc...). |Java.awt.Component|Java.awt.Component + java.awt.Component|org.apache.wicket.Component| |---|---|---| |\+ add(in c: java.awt.Component)|\+ add(in c: org.apache.wicket 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 | 2 年前3
Introducing Apache Wicketpages 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 | 2 年前3
JAVA 应用与开发 - 控制台应用程序设计println("App01\_is\_running..."); } } ### CODE ▶ TestApp02.java import java.awt.*; import java.awt.event.*; public class TestApp02 { public static void main(String[] args) { Frame0 码力 | 63 页 | 2.84 MB | 2 年前3
Apache Wicket 8.x Reference Guidepages 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 containing HTML components (pictures, buttons, forms, etc...). **Component** | Component java.awt.Component | java.awt.Component org.apache.wicket.Component | org.apache.wicket.Component org.apache.wicket.WebPage 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 | 2 年前3
Apache Wicket 7.x Reference Guidepages 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 containing HTML components (pictures, buttons, forms, etc...). **Component** | Component java.awt.Component | java.awt.Component org.apache.wicket.Component | org.apache.wicket.Component org.apache.wicket.WebPage 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 | 2 年前3
共 41 条
- 1
- 2
- 3
- 4
- 5
相关搜索词
AWTSwingGUI 事件处理组件和容器布局管理Java 应用与开发Java SEJava EE开发环境配置面向对象编程线程线程生命周期线程控制线程同步后台线程JenkinsSystem InformationEnvironment VariablesPluginsJavaApache WicketKaraf组件模块架构WicketComponentWebPageApplicationRequestCyclemodelsformscomponent-oriented frameworkresource handling控制台应用程序命令行参数标准输入输出文件操作Jar工具Wicket框架组件树模型页面数据会话作用域Web开发框架企业应用文档结构













