Notices Assn 3 is posted – due this Friday. Quiz marking underway (still). See assn 3 forum postings on use of Color class and meaning of second Emitter.

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming
Advertisements

Tutorial 8: Developing an Excel Application
Creating an OOED Application
Today Assn 3 posted. Due March 13. Quiz 2 solutions posted. Assignment 2 sample solution is posted. Introduce Event-Driven Programming and GUI Design.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Unit 091 Introduction to GUI Programming Introduction to User Interfaces Introduction to GUI Programming GUI Design Issues GUI Programming Issues Java.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
GUI Programming in Java Tim McKenna GUI Programming Concepts l conventional programming: sequence of operations is determined by the program.
Java Swing - Lecture 1 An Introduction Milena Radenkovic slides originally by Chris Coleman.
Microsoft Office Illustrated Fundamentals Unit B: Understanding File Management.
PROGRAMMING REVIEW Lab 2 EECS 448 Dr Fengjun Li and Meenakshi Mishra.
Crafting a successfu l (inline) Information Experience: Understanding how users read online Crafting a successfu l (inline) Information Experience: Understanding.
Systems Analysis and Design in a Changing World, 6th Edition
Java Programming Chapter 10 Graphical User Interfaces.
1 Lesson 6 Exploring Microsoft Office 2007 Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
14 Chapter 11: Designing the User Interface. 14 Systems Analysis and Design in a Changing World, 3rd Edition 2 Identifying and Classifying Inputs and.
Software Construction Lecture 10 Frameworks
Web Site Design Principles
IE 411/511: Visual Programming for Industrial Applications
Lecture 5: Interaction 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 711,  ex 2271 
Introduction to PowerPoint Curriculum Implementation Day Friday, November 3, 2006 K.J. Benoy.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
Chapter 9: Visual Programming Basics Object-Oriented Program Development Using Java: A Class-Centered Approach.
Slides prepared by Rose Williams, Binghamton University ICS201 Lecture 13 : Swing I King Fahd University of Petroleum & Minerals College of Computer Science.
Ch 3-4: GUI Basics Java Software Solutions Foundations of Program Design Sixth Edition by Lewis & Loftus Coming up: GUI Components.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
INFO 355Week #71 Systems Analysis II User and system interface design INFO 355 Glenn Booker.
CS Lecture 00 Swing overview and introduction Lynda Thomas
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Graphical User Interfaces (Part 2) 1. View  view  presents the user with a sensory (visual, audio, haptic) representation of the model state  a user.
Chapter 12Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Announcements/Reminders l Next week: »No Lectures »No Labs »Recitation.
Java Applets: GUI Components, Events, Etc. Ralph Westfall June, 2010.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Java GUI. Graphical User Interface (GUI) a list a button a text field a label combo box checkbox.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Design Phase intro & User Interface Design (Ch 8)
Computer Science [3] Java Programming II - Laboratory Course Lab 4 -1 : Introduction to Graphical user interface GUI Components Faculty of Engineering.
Cs413_design02.ppt GUI Design The User Controls Navigation Traditional GUI design the designer can control where the user can go gray out menu options.
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
Chapter 10 - Writing Graphical User Interfaces1 Chapter 10 Writing Graphical User Interfaces.
View  view  presents the user with a sensory (visual, audio, haptic) representation of the model state  a user interface element (the user interface.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Notices Assn 3 is posted – due tomorrow. Quiz marking underway (still – sigh…). Alternate solution code was added on Tuesday to the assignment 3 statement.
1. Using word you can create the document and edit them later, as and when required,by adding more text, modifying the existing text, deleting/moving.
Today Javadoc. Packages and static import. Viewing API source code. Upcoming Topics: –protected access modifier –Using the debugger in Eclipse –JUnit testing.
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Word processing is the software package that enables you to create,edit, print and save documents for future retrieval reference. creating a document.
Dive Into® Visual Basic 2010 Express
A First Look at GUI Applications
Chapter Topics 15.1 Graphical User Interfaces
An Introduction to Computers and Visual Basic
Java Look-and-Feel Design Guidelines
An Introduction to Computers and Visual Basic
CISC124 Quiz 2 grading underway.
CMPE212 – Stuff… Assn 3 sample solution is posted.
GUIS: Graphical User Interfaces
CISC124 Last Quiz next week. Topics listed in Tuesday’s lecture.
An Introduction to Computers and Visual Basic
Week 8 Swing NetBeans GUI Builder
Chapter 15: GUI Applications & Event-Driven Programming
Winter 2019 CMPE212 4/20/2019 CMPE212 – Reminders
Microsoft Office Illustrated Fundamentals
CMPE212 – Reminders Assignment 2 due today, 7pm.
CMPE212 – Reminders Assignment 5, a JavaFX GUI, due this Friday.
CMPE212 – Reminders Assignment 5, a JavaFX GUI, due next Friday.
TA: Nouf Al-Harbi NoufNaief.net :::
Presentation transcript:

Notices Assn 3 is posted – due this Friday. Quiz marking underway (still). See assn 3 forum postings on use of Color class and meaning of second Emitter argument. Winter 2016CMPE212 - Prof. McLeod1

Today AWT, Swing, JavaFX. Event-Driven Programming. GUI Design. Winter 2016CMPE212 - Prof. McLeod2

Winter 2016CMPE212 - Prof. McLeod3 Hierarchy Example - GUI Components Of Historical Interest: Many of these are part of the Component hierarchy in javax.swing Swing was a modern improvement, built on the older, AWT (“Abstract Windows Toolkit”) classes. The following diagram is a simplified summary of the structure:

Winter 2016CMPE212 - Prof. McLeod4 ComponentGridLayoutBorderLayoutFlowLayout Container Abstract Class Concrete Class Object Window Frame JFrameJComponent java.awt javax.swing

Winter 2016CMPE212 - Prof. McLeod5 AbstractButton JMenuItem JLabel JMenuBar JPanel JTextArea JFrameJComponent javax.swing JMenu JButton JTextComponent JTextField

JavaFX JavaFX classes are no longer part of this hierarchy. JavaFX is a bold, new world of GUI coding! Swing code will not longer be updated. Any improvements will be in JavaFX packages only. Library code used to be in a separate API, but now javafx.* packages are included in the distributed JRE (in jfxrt.jar). You still need to configure eclipse to program in JavaFX (later). Winter 2016CMPE212 - Prof. McLeod6

JavaFX, Cont. Swing was developed mostly for enterprise/business use, not for personal use and certainly not for mobile devices. Available in the API since Java 7. The latest is called JavaFX 8. There are 30 javafx.* packages in the API. Jazzier controls, more support for portable devices. Winter 2016CMPE212 - Prof. McLeod7

“Client Technologies” For lots of links on JavaFX and Swing see: clienttechnologies.htm It would be fun to learn JavaFX right away, but we need to “walk” before we can “run”! Winter 2016CMPE212 - Prof. McLeod8

Winter 2016CMPE212 - Prof. McLeod9 Event-Driven Programming So far, for assignments, you have written single threaded “batch” programs – the coder (you!) controls the flow of execution. For event-driven programs, the user controls the flow by initiating events. A GUI interface consists of components contained within a frame (or “window”). Components and even the frame itself can respond to events.

Winter 2016CMPE212 - Prof. McLeod10 Possible Events Some things that can trigger code execution: –Left mouse click down on a command button. –Left mouse click down on any component. –Similarly for any mouse button. –Similarly for holding a mouse button down. –Similarly for mouse button up. –Double click on a component… –Cursor over a component. –Cursor leaving a component. –Cursor hovering over a component. –Component has focus or has lost focus. –Component contents have changed. –Alt-key or Cntrl-key or Shift-key, etc…

Winter 2016CMPE212 - Prof. McLeod11 Events, Cont. Most events you ignore – your interface does not have to respond to every possible keyboard and mouse initiated event – that would be crazy!! To respond to an event in code, you attach an Event Handler object to a component. When an event occurs the handler receives an object which contains information about the source of the event (which mouse button, etc.) You decide which events are of interest and what you want your program to do when these events occur.

GUI Construction Construction of a Graphical User Interface involves: –Creating the design of the window – choosing components (buttons, labels, text boxes, etc.) and where they are positioned in the window. –Changing properties, including appearance properties, of the components. –Adding and linking functionality to events, where needed. –Repeating these steps for each window! –Connecting the program flow between windows. Winter 2016CMPE212 - Prof. McLeod12

Winter 2016CMPE212 - Prof. McLeod13 GUI Design Interface design is a BIG topic – beyond the scope of this course. IDE (Integrated Development Environments) tools can make it easy to choose and position components on a frame – but is the design as user-friendly as possible? Too many GUI programs have been slapped together without much thought as to their usability.

Winter 2015CMPE212 - Prof. McLeod14 Interface Hall of Shame! This site is dated (circa 2000), but the points it raises are still valid. And many of the examples are humorous! Also has links to other resources on interface design. Also:

Winter 2016CMPE212 - Prof. McLeod15 Isys Information Architects Web Site Part of their development philosophy: “Software must assist the user perform a task, not become a task in itself. Software must not make the user feel stupid. Software must not make the computer appear to be stupid”.

Winter 2016CMPE212 - Prof. McLeod16 “Principles of Good GUI Design” by James Hobart (CCI) (Corporate Computing International) Avoid the Biggest Problems: –Forgetting the user. –Not allowing the user full control. –Putting too many features at the top level. Understand People –Pattern/picture recognition – don’t expect a user to work from memory all the time. –Stay open to the different experiences and perspectives of your users.

Winter 2016CMPE212 - Prof. McLeod17 James Hobart, Cont. Design for Clarity and Consistency –Use consistent, self-explanatory terms for operations throughout the entire system. –(Enforced by Macintosh, but not Microsoft…) –Pay “homage” to common operational terms like “copy”, “paste”, “save”, “save as”, etc. Provide Visual and Audible Feedback –Use progress bars for operations that take more than a few seconds. –Use sounds to warn users, but allow him to turn these off later…

Aside – “Design Leadership” From: leadership/ Winter 2016CMPE212 - Prof. McLeod18

Winter 2016CMPE212 - Prof. McLeod19 James Hobart, Cont. Use Text Sparingly But Wisely –Text should be descriptive but concise and accurate. –Might be a task for a trained technical writer? Provide Traceable Paths –The user should always know how he arrived at the current window and how to get back out again. –Not so easy to implement!

Winter 2016CMPE212 - Prof. McLeod20 James Hobart, Cont. Provide Keyboard Support –Challenge: Can a user navigate and use all of your program without using a mouse? –What operations should be mouse only? Maintain a Consistent “Look and Feel” –Give a lot of thought to a single look and feel style that can be used throughout your project. –(Changing the style of your presentation later can be very time consuming!)

Winter 2016CMPE212 - Prof. McLeod21 James Hobart, Cont. Control Window Types and Numbers –You can use “modal” dialog boxes for finite tasks (such as getting a specific user input). –Otherwise try to keep the number of simultaneous modeless boxes to three or less. –(What is the difference between modal and modeless windows, anyways?)

Winter 2016CMPE212 - Prof. McLeod22 Google Web Page Design See: Skip the first few minutes – start at about 2:40

Winter 2016CMPE212 - Prof. McLeod23 Web Usability See Good on-line books: urFace/userInYourFace.htm

Books ( whatever they are… ) “GUI Bloopers 2.0”, by Jeff Johnson (also see “Designing with the Mind in Mind: Simple Guide to Understanding User Interface Design Rules”, also by Jeff Johnson “Don't Make Me Think: A Common Sense Approach to Web Usability”, 2nd Edition, by Steve Krug Many others! Winter 2016CMPE212 - Prof. McLeod24

Web Design vs. Application UI Design What are the different design considerations between a web app, a PC app and (what the heck!) a portable app? How about touch screens vs. a normal keyboard/mouse interface? Winter 2016CMPE212 - Prof. McLeod25