Graphical User Interfaces and Java Display Components Session 6 LBSC 790 / INFM 718B Building the Human-Computer Interface.

Slides:



Advertisements
Similar presentations
CS18000: Problem Solving and Object-Oriented Programming.
Advertisements

Introduction to JFC Swing Written by Adam Carmi. Agenda About JFC and Swing Pluggable Look and Feel Swing Components Borders Layout Management Events.
Fall 2007CS 225 Graphical User Interfaces Event Handling Appendix C.
 What are the basic GUI components we’ve learned so far? › JFrame › JPanel › JButton › JLabel › JTextArea › JTextField › JCheckBox › JRadioButton › Paint.
Week 5 LBSC 690 Information Technology Human-Computer Interaction.
Data Structures Session 9 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Department of Information Science and Telecommunications Interactive Systems Michael B. Spring Department of Information Science and Telecommunications.
Class 6 LBSC 690 Information Technology Human Computer Interaction and Usability.
Human-Computer Interaction and Prototype Demos Session 8 INFM 718N Web-Enabled Databases.
Week 11 LBSC 690 Information Technology Human Computer Interaction.
Graphical User Interfaces (GUIs) GUI: An application that uses graphical objects to interact with users GUI applications consist of: –Events: A user or.
Ch 7 & 8 Interaction Styles page 1 CS 368 Designing the Interaction Interaction Design The look and feel (appearance and behavior) of interaction objects.
Class 11 LBSC 690 Information Technology Multimedia.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 14 GUI and Event-Driven Programming.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 14 GUI and Event-Driven Programming.
Interaction Styles Interface Widgets. What are Interaction Styles?  A Collection of interface objects and associated techniques from which an interaction.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Chapter 13: Advanced GUIs and Graphics J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition.
Scott Grissom, copyright 2006Ch 11: GUI Slide 1 Graphical User Interfaces (Ch 11) Careful design of a graphical user interface is key to a viable software.
Graphical User Interface (GUI) Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
CPSC150 Week 12 Graphical User Interfaces Chapter 11.
Graphic User Interfaces Part 1. Typical GUI Screen from Microsoft Word What GUI “components” can you see? –Menus? Buttons? Labels? What else? –Anything.
PROGRAMMING REVIEW Lab 2 EECS 448 Dr Fengjun Li and Meenakshi Mishra.
Session 10 LBSC 690 Information Technology Human Computer Interaction.
Chapter 13 Advanced GUIs and Graphics. Chapter Objectives Learn about applets Explore the class Graphics Learn about the class Font Explore the class.
11.10 Human Computer Interface www. ICT-Teacher.com.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 7 Interfacing with Users.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 12 Advanced GUIs and Graphics.
CIS 068 Welcome to CIS 083 ! Introduction to GUIs: JAVA Swing.
Introduction to GUI in Java 1. Graphical User Interface Java is equipped with many powerful,easy to use GUI component such as input and output dialog.
Object Oriented Programming Ders 11: Interfaces Mustafa Emre İlal
Basic Computer and Word Functions, part 1 Read the information and use to answer the questions in the Basic Computer and Word Functions Study Guide.
3461A Readings from the Swing Tutorial. 3461A Overview  The follow is the Table of Contents from the trail “Creating a GUI with JFC/Swing” in the “The.
Introduction to Swing Components Chapter 14.  Part of the Java Foundation Classes (JFC)  Provides a rich set of GUI components  Used to create a Java.
Java Programming: Advanced Topics 1 Common Elements of Graphical User Interfaces Chapter 6.
Graphical User Interface Components Chapter What You Will Learn Text Areas Text Areas Sliders Sliders Menus Menus –With frames –Pop up menus Look.
Oct 071 Example Program DemoLookAndFeel.java Metal (java) Motif Windows.
1 Outline 1 Introduction 2 Overview of Swing Components 3 JLabel 4 Event Handling 5 TextFields 6 How Event Handling Works 7 JButton 8 JCheckBox and JRadioButton.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Collaboration and Sequence Diagrams and Graphical User Interfaces
Object Oriented Programming Engr. M. Fahad Khan Lecturer, Software Engineering Department University of Engineering & Technology, Taxila.
CSE1030-HR GUI The Big Picture Building the View Building the Controller Separating the Concerns Going Further.
Lec.10 (Chapter 8 & 9) GUI Jiang (Jen) ZHENG June 27 th, 2005.
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Introduction to Java Chapter 9 - Graphical User Interfaces and Applets1 Chapter 9 Graphical User Interfaces and Applets.
Swing - 2 Session 13. Swing - 2 / 2 of 38 Objectives (1) Discuss trees and tables Discuss progress bars Discuss MVC architecture Describe menus.
5-Jan-16 R Ramesh Swing. 5-Jan-16 R Ramesh An Introduction to Java Foundation Classes (JFC) A suite of libraries to assist programmers create enterprise.
Algorithms and Graphical User Interfaces (part 2) Session 8 LBSC 790 / INFM 718B Building the Human-Computer Interface.
Creating a Window. A basic window in Java is represented by an object of the class Window in the package java.awt.
Ajmer Singh PGT(IP) JAVA IDE Programming - I. Ajmer Singh PGT(IP) GUI (Graphical User Interface) It is an interface that uses a graphic entities along.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Computer Science [3] Java Programming II - Laboratory Course Lab 4 -1 : Introduction to Graphical user interface GUI Components Faculty of Engineering.
Chapter 2 HAEDWAER.
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
1 Lecture 8: User Interface Components with Swing.
3461 Course Summary COSC 3461A Fall Intro to UI Design  Course plan: Implementation, Evaluation, Design  Human Computer Interaction is an.
Introduction to GUI in 1 Graphical User Interface 3 Nouf Almunyif.
Introduction to GUI Programming in Java: Frames, Simple Components, and Layouts.
CIS 270—Application Development II Chapter 11—GUI Components: Part I.
Introduction to Swing Mr. Crone. What is Swing? a collection of pre-made Java classes used to create a modern graphical user interface.
Module 13: Swing API Object Oriented Programming(Java)
Java Swing What is swing? Swing is a ”Lightweight” GUI ToolKit for Java Different from AWT / SWT Toolkits for GUIs Few lines of code to produce GUI elements.
A Quick Java Swing Tutorial
Standard Methods of Input.
Human Computer Interaction Lecture 07 The Interaction
Advanced User Interfaces
11.10 Human Computer Interface
GUIS: Graphical User Interfaces
Advanced Programming in Java
Graphical User Interface
Presentation transcript:

Graphical User Interfaces and Java Display Components Session 6 LBSC 790 / INFM 718B Building the Human-Computer Interface

Agenda Questions Human-Computer Communications Graphical User Interfaces GUI’s in Java Event handling

Interaction Styles Language-based interfaces –Command line interfaces –Interactive voice response systems Graphical User Interfaces (GUI) Virtual Reality (VR) Ubiquitous computing

Human-Computer Communication Task System Mental ModelsSight Sound Hands Voice TaskUser Software ModelsKeyboard Mouse Display Speaker Human Computer

Mental Models How the user thinks the machine works –What actions can be taken? –What results are expected from an action? –How should system output be interpreted? Mental models exist at many levels –Hardware/operating system/network –Application programs –Information resources

Human Senses Visual –Position/motion, color/contrast, symbols Auditory –Position/motion, tones/colume, speech Haptic –Mechanical, thermal, electrical, kinesthethic Olfactory –Smell, taste Vestibular

Computer Output Image –Fixed view, movable view, projection Acoustic –Headphones, speakers, within-ear monitors Tactile –vibrotactile, pneumatic, piezoelectric Force feedback –Joystick, pen, dexterous handmaster

Computer Output Inertial –Motion-based simulators Locomotive –Stationary bicycle, treadmill,... Olfactory –Chemical (requires resupply) Temperature

Visual Perception Closely spaced dots appear solid –But irregularities in diagonal lines can stand out Any color can be produced from just three –Red, Blue and Green: “additive” primary colors High frame rates produce apparent motion –24 fps (16mm film), 30 fps (NTSC video) Visual acuity varies markedly across features –JPEG and MPEG suppress imperceptible features

Input Devices Text –Keyboard –Optical character recognition –Speech recognition –Handwriting recognition Direct manipulation –2-D: mouse, trackball, touch pad, touch panel –3-D: wand, data glove Remote sensing –Camera, speaker ID, head tracker, eye tracker

2-D Direct Manipulation Match control actions with on-screen behavior –Use a cursor for visual feedback if needed Rotary devices –Mouse, trackball Linear devices –Touch pad, touch panel, touch screen, joystick Rate devices –Laptop eraserhead

WIMP Interfaces Windows –Spatial context Icons –Direct manipulation Menus –Hierarchy Pointing devices –Spatial interaction

GUI Interaction Options Direct manipulation –Point and click, scrolling, sliders, … Menus Text –Complete or dynamic queries

Direct Manipulation Select a metaphor –Desktop, CD player, map, … Use icons to represent conceptual objects –Watch out for cultural differences Manipulate those objects –Select (e.g., left click, right click, double click) –Move (e.g., drag and drop)

Menus Conserve screen space by hiding functions –Menu bar, pop-up Can hierarchically structured –By application’s logic –By convention (e.g., where is the print function?) Tradeoff between breadth and depth –Too deep  can become hard to find things –Too broad  becomes direct manipulation

Dynamic Queries What to do when menus become too deep? –Merge keyboard and direct manipulation Select menu items by typing part of a word –After each letter, update the menu –Once the word is displayed, user can click on it Example: Windows help index

GUI Components Windows (and panels) –Resize, drag, iconify, scroll, destroy Selectors –Menu bars, pulldown lists Buttons –Labeled buttons, radio buttons, checkboxes Icons –Text, images

GUI Design Strategies Platform-specific –Development tool tuned for a windowing system Microsoft Windows, Mac, Unix X Windows Native look and feel (Optional in Java) –Design using capabilities available on every system Separation of content management and display functions Common look and feel (Default in Java w/Swing) –Adopt a common look and feel across platforms

Java Swing Swing: High-level abstract operations –Containers –Components Layout managers –Relative positioning Low-level operations for detailed control –Absolute positioning –Drawing (Graphics)

Swing Controls JButton JToggleButton JRadioButton JCheckBox JList JMenuBar, JMenu, JMenuItem JComboBox (pop up menu) JTree JSlider JTextField, JTextArea

Display Elements JLabel Icon JProgressBar setToolTipText()

Java Event Model Create a GUI object –JButton swapButton = new JButton(“swap”); Register the class containing the event listener –swapButton.addActionListener(swapHandler); Create an inner class to “handle” the event –“implements” the appropriate listener interface(s) class swapHandler implements actionListener { … } Create appropriate listener methods in that class –actionPreformed()

Standard Swing Listeners componentListener –size, position, visibility focusListener –gain or lose keyboard input keyListener –keyboard input mouseListener –mouse clicks and window entry/exit mouseMotionListener –cursor position

Java Containers Displayable windows –JFrame Subordinate windows (“dialogs”) –JOptionPane, JColorChooser, JFileChooser Grouping for layout management –JPanel Specialized containers –JScrollPane –JTabbedPane –JSplitPane

Some Layout Managers GridLayout: graph paper, identical shapes BoxLayout: one column (or row) FlowLayout: rows, with “component wrap” (default for JPanel) BorderLayout: top, bottom, sides, center (default for JFrame) GridBagLayout: graph paper w/different shapes

Muddiest Point On a blank sheet of paper, write a single sentence that will convey to me what you found to be the most confusing thing that was discussed during today’s class.