{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


L10cs2110fa08-6up - Announcements Introduction to Graphical...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Graphical User Interfaces (GUIs) Lecture 10 CS2110 – Fall 2008 Announcements ! A3 is up, due Friday, Oct 10 ! Prelim 1 scheduled for Oct 16 " if you have a conflict, let us know now 2 3 Interactive Programs ! “Classic” view of computer programs: transform inputs to outputs, stop ! Event-driven programs: interactive, long-running " Servers interact with clients " Applications interact with user(s) user user program input events output events input output 4 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 # 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 ! Design...Which to pick? " Program called by another program? " Program used at command line? " Program interacts often with user? " Program used in window environment? ! How does Java do GUIs? 5 Java Support for Building GUIs ! Java Foundation Classes " Classes for building GUIs " Major components # awt and swing # Pluggable look-and-feel support # Accessibility API # Java 2D API # Drag-and-drop Support # Internationalization ! Our main focus: Swing " Building blocks of GUIs # Windows & components # User interactions " Built upon the AWT (Abstract Window Toolkit) # Java event model 6 Java Foundation Classes ! 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, ... ! Drag-and-drop " Support for drag and drop between Java application and a native application ! Internationalization " Support for other languages
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
7 GUI Statics and GUI Dynamics ! Statics: what’s drawn on the screen " Components # buttons, labels, lists, sliders, menus, ... " Containers: components that contain other components # frames, panels, dialog boxes, ... " Layout managers: control placement and sizing of components ! Dynamics: user interactions " Events # button-press, mouse-click, key- press, ...
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}