This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 9/28/2010 1 INTRODUCTION TO GRAPHICAL USER INTERFACES (GUI S ) Lecture 10 CS2110 Fal 2009 Announcements 2 A3 will be posted shortly, please start early Prelim 1: Thursday October 14, Uris Hall G01 We do NOT have any scheduled makeup exam We do NOT have any scheduled makeup exam People with conflicts can take the exam early. The NORMAL scheduled time is 7:30-9:00 If you have a conflict, take it from 6:00-7:30 Out of town conflicts: youll take it during one of these two time periods, supervised by some trustworthy person, who can receive exam/send it back Interactive Programs 3 Classic view of computer programs: transform inputs to outputs, stop input output Event-driven programs: interactive, long-running Servers interact with clients Applications interact with user(s) user user program input events output events GUI Motivation Interacting with a program Program-Driven = Proactive Statements execute in sequential, predetermined order Typically use keyboard or file I/O, but program determines when that happens Design...Which to pick? Program called by another program? Program used at command line? Program interacts often with 4 program determines when that happens Usually single-threaded Event-Driven = Reactive Program waits for user input to activate certain statements Typically uses a GUI (Graphical User Interface) Often multi-threaded user? Program used in window environment? How does Java do GUIs? Java Support for Building GUIs Java Foundation Classes Classes for building GUIs Major components awt and swing Our main focus: Swing Building blocks of GUIs Windows & components User interactions Built upon the AWT (Abstract Window 5 awt and swing Pluggable look-and-feel support Accessibility API Java 2D API Drag-and-drop Support Internationalization Toolkit) Java event model Why Swing? Easier to understand than SWT Lonnie used SWT in A3 but you dont actually need to understand the code he wrote Swing versus SWT versus AWT AWT came first Swing builds on AWT Strives for total portability SWT is new Goal is best performance Great fit with 6 Secretly seems to have a grudge against Windows Basic architecture is pretty standard Windows system Basic architecture is pretty standard 9 We use SWT in A3 9/28/2010 2 Java Foundation Classes 7 Pluggable Look-and-Feel Support Controls look-and-feel for particular windowing environment E.g., Java, Windows, Mac Accessibility API Supports assistive technologies such as screen readers and Braille Java 2D Drawing Includes rectangles, lines, circles, images, ......
View Full Document
This note was uploaded on 09/30/2011 for the course CS 2110 taught by Professor Francis during the Fall '07 term at Cornell University (Engineering School).
- Fall '07