当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

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

资源类别:文库,文档格式:PPT,文档页数:98,文件大小:3.09MB,团购合买
3.2.1 Swing Components and Containers 3.2.2 Swing Event Handling
点击下载完整版文档(PPT)

四叫川学国家性 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. Double￾buffering 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

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共98页,可试读20页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有