110 likes | 365 Views
Introduction to GUI Programming. Learning Outcomes Explain the motivation for, and usefulness of GUIs. List and explain seven principles of good GUI design and their benefits. Discuss what GUI programming involves, and explain how Java's GUI library evolved. Introduction to User Interfaces
E N D
Introduction to GUI Programming • Learning Outcomes • Explain the motivation for, and usefulness of GUIs. • List and explain seven principles of good GUI design and their benefits. • Discuss what GUI programming involves, and explain how Java's GUI library evolved. • Introduction to User Interfaces • GUI Design Issues • GUI Programming Issues • Self-check Exercise • Java GUI Library Evolution • Exercises Unit 10
Introduction to User Interfaces • A user interface (UI) is that part of a program that interacts with the user • A user interface can be based on text or graphics. • In a text-based UI the commands are entered from the keyboard. • In a graphical UI the user interacts with GUI objects. • In a console program, the system usually controls user actions. • In GUI programs, the user controls the behavior of the program. • Thus, GUI programs give more control to the user. Unit 10
Principles of GUI Design • Give time for GUI design and integration. • Have a simple and clear layout. • Use graphics objects and terminology consistently. • Be functionally intuitive and visually attractive. • Provide visual and audible feedback. • Be responsive. • Be flexible and customizable. Unit 10
Benefits of Good GUIs • Facilitate higher user productivity and lower long-term costs. • Improve integrity of underlying application. • Improve the reliability and safety of mission-critical applications. • Improve user confidence. • Make software more marketable. Unit 10
GUI Programming Issues • What do I need to know to write good GUI applications? • Writing GUI applications requires knowledge of: • Graphics • Media • Windows • Events • Multithreading Unit 10
Java GUI API Evolution • Java provides classes representing UI items like windows, buttons, menus etc. • The GUI toolkit in older versions of Java is called AWT. • An enriched version the toolkit, Swing, was developed in later versions of Java. • AWT and Swing are part of the Java Foundation Classes (JFC). • Why was Swing developed in addition to AWT? Unit 10
Java GUI API Evolution (cont'd) • Programs using AWT components are multi-platform. • However, GUI components in AWT are abstract and rely on native peers. • By relying on native peers, AWT components are limited: • slow on some platforms. • portability problems. • Unlike AWT, Swing components are rendered and controlled by the JVM. Unit 10
Review Exercises • Explain the advantages of graphics-based over text-based user interfaces. • What is a good and effective GUI? Why is it necessary to design GUI for all on-trivial applications? Explain.. • Explain the implications of good as well as badly designed GUIs. • What is JFC? What Swing? Why was the JFC enriched with Swing? • AWT components are said to be heavy weight while Swing components are said to be light weight. Explain what these notions mean. • Enumerate the major knowledge units that must be understood for developing effective GUI applications. Briefly explain each of these knowledge units. Unit 10