四川大学:Object-Oriented Design and Programming(Java,PPT课件)3.2 Graphical User Interface

四叫川学国家性 GINEEHING OahGE Object-Oriented Design and Programming Java)
Object-Oriented Design and Programming (Java)

Topics Covered Today 3.2 Graphical User Interface 3.2. 1 Swing Components and Containers 3.2.2 Swing Event Handling
2 Topics Covered Today • 3.2 Graphical User Interface – 3.2.1 Swing Components and Containers – 3.2.2 Swing Event Handling

GUI libraries in java Abstract Windows Toolkit(AWT) since Java 1.0 Swing- Add-on since Java 1. I and integral part of Java 1.2 Third party GUI libraries like the Standard Windows Toolkit(SWT)e.g. used in eclipse Here, we use Swing
3 GUI libraries in JAVA • Abstract Windows Toolkit (AWT) since Java 1.0 • Swing - Add-on since Java 1.1 and integral part of Java 1.2 • Third party GUI libraries like the Standard Windows Toolkit (SWT) e.g. used in Eclipse Here, we use Swing!

Swing is Standard in Java 2 Platform (also known as JDK 1.2 Includes java2D Adds support for MIDi, Wav, and other audio Swing package: javax. swing. awt package: java. awt. x
4 Swing is Standard in Java 2 Platform (also known as JDK 1.2) • Includes Java2D • Adds support for MIDI, WAV, and other audio. • Swing package: javax.swing.* AWT package: java.awt.*

Reference book Thinking in Java (2nd Edition), bruce Eckel. prentice hall Chapter l3 Creating windows applets Getting Started with Swing http://java.sun.com/docs/books/tutorial/uiswing/
5 Reference Book • Thinking in Java (2nd Edition), Bruce Eckel, Prentice Hall Chapter 13 Creating Windows & Applets • Getting Started with Swing http://java.sun.com/docs/books/tutorial/uiswing/

New Features in Swing Lightweight. Not built on native window-system windows Much bigger set of built-in controls. Trees, image buttons tabbed panes, sliders, toolbars, color choosers tables etc Much more customizable(可定制) Can change border, text alignment, or add image to almost any control
6 New Features in Swing • Lightweight. Not built on native window-system windows. • Much bigger set of built-in controls. Trees, image buttons, tabbed panes, sliders, toolbars, color choosers, tables, etc. • Much more customizable(可定制). Can change border, text alignment, or add image to almost any control

New Features in Swing Pluggable" look and feel. Can change look and feel at runtime or design own look and feel Many miscellaneous new features. Double buffering built in, tool tips, keyboard accelerators custom cursors. etc
7 New Features in Swing • Pluggable" look and feel. Can change look and feel at runtime, or design own look and feel. • Many miscellaneous new features. Doublebuffering built in, tool tips, keyboard accelerators, custom cursors, etc

AWT Components primitive r- Component Button Container \container canvas Checkbox Panel window 「 Choice Label Frame Dialog List Scrollbar ile Dialog Textcomponent javaaPplet Applet Textarea TextField
8 AWT Components primitive container

Swing Components JComponent」 JButton 恒E烈 儿 Sahel JPanel COmbo口x CHeckbOx H □ JApplet]翻頵癜鼬H JList JScrollbar Jframe JDialog JTextcomponent卜 Jwindow 「 JTextField「 JTextArea
9 Swing Components

Frame a Frame is a top -level window with a title and a border java. lang Object +----iavaawt component java. awt Container +-<-java awt window +----java awt Frame
10 Frame • A Frame is a top-level window with a title and a border
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《计算机系统结构》课程教学资源(PPT课件讲稿)第三章 流水线技术.ppt
- 南京大学:《面向对象技术 OOT》课程教学资源(PPT课件讲稿)异常处理 Exception Handling.ppt
- 中国科学技术大学:云计算基本概念、关键技术、应用领域及发展趋势.pptx
- 《C程序设计》课程电子教案(PPT课件讲稿)第二章 基本数据类型及运算.ppt
- 《电子商务概论》课程教学资源(PPT课件)第十章 电子商务安全技术.ppt
- 中国铁道出版社:《局域网技术与组网工程》课程教学资源(PPT课件讲稿)第4章 Windows Server系统工程.ppt
- 《Internet技术与应用》课程PPT教学课件(讲稿)第3讲 双绞线制作和传输介质.ppt
- jQuery个人主页(PPT讲稿).ppt
- 《数据结构》课程教学资源(PPT课件讲稿)第10章 内排序.ppt
- 最小生成树(PPT课件讲稿)Minimum Spanning Trees.pptx
- 中国科学技术大学:《数据结构与数据库》课程教学资源(PPT课件讲稿)第五章 串和数组.pps
- 上海交通大学:《网络科学导论》课程PPT教学课件(Network Science An Introduction)Chapter 4 Degree Correlations & Community Structure.pptx
- 同济大学:《大数据分析与数据挖掘 Big Data Analysis and Mining》课程教学资源(PPT课件讲稿)Decision Tree.ppt
- 《软件工程》课程教学资源(PPT课件讲稿)详细设计.ppt
- 《汇编语言程序设计》课程教学资源(PPT课件讲稿)第二章 IBM-PC微机的功能结构.ppt
- 清华大学:高校信息化建设理论与规划(PPT讲稿).ppt
- 数据挖掘10大算法产生过程(PPT讲稿).ppt
- 《计算机文化基础》课程教学资源(PPT课件讲稿)第九章 多媒体技术基础.ppt
- 香港浸会大学:Computer Security(PPT课件讲稿)Cryptography Chapter 1 Symmetric Ciphers.ppt
- 同济大学:《大数据分析与数据挖掘 Big Data Analysis and Mining》课程教学资源(PPT课件讲稿)Getting to Know Your Data.ppt
- 《编辑原理》课程教学资源(PPT课件)目标代码生成.pptx
- 上海交通大学:操作系统安全(PPT课件讲稿)设备管理与I/O系统.pps
- 中国科学技术大学:《计算机体系结构》课程教学资源(PPT课件讲稿)第7章 多处理器及线程级并行 7.1 引言 7.2 集中式共享存储器体系结构.pptx
- 《单片机原理及应用》课程教学资源(PPT课件讲稿)第11章 单片机应用系统的串行扩展.ppt
- 西安电子科技大学:《数据库系统 DataBase System》课程教学资源(PPT课件讲稿)normalization.ppt
- 《计算机软件技术基础》课程教学资源(PPT课件讲稿)排序(教师:曾晓东).ppt
- 四川大学:《计算机网络 Computer Networks》课程教学资源(PPT课件讲稿)Unit5 Introduction to Computer Networks.ppt
- 《微型计算机原理及接口技术》课程电子教案(PPT课件)第9章 AT89S52单片机的I/O扩展.ppt
- 《数据挖掘导论 Introduction to Data Mining》课程教学资源(PPT课件讲稿)Data Mining Classification(Basic Concepts, Decision Trees, and Model Evaluation).ppt
- 《计算机组成与设计》课程教学资源(PPT课件讲稿)第2章 指令——计算机的语言.ppt
- 清华大学:Local Area Network and Ethernet(PPT课件讲稿).pptx
- 《密码学》课程教学资源(PPT课件讲稿)第10章 密码学的新方向.ppt
- 《计算机系统安全》课程教学资源(PPT课件讲稿)第七章 公开密钥设施PKI Public key infrastructure.ppt
- 《数字图像处理》课程PPT教学课件(讲稿)第四章 点运算.ppt
- 《编译原理》课程教学资源(PPT课件讲稿)第八章 代码生成.ppt
- Introduction to Convolution Neural Networks(CNN)and systems.pptx
- 华北科技学院:数字视频教学软件与制作(PPT课件讲稿)数字视频编辑软件Premiere 6.5(主讲:于文华).ppt
- 中国科学技术大学:《Linux操作系统分析》课程教学资源(PPT课件讲稿)文件系统.ppt
- 哈尔滨工业大学:再探深度学习词向量表示(PPT课件讲稿)Advanced word vector representations(主讲人:李泽魁).ppt
- 《Visual Basic程序设计》课程教学资源(PPT课件讲稿)第四章 VB的基本语句.pps