CS2_34_IntroToGUIs

CS2_34_IntroToGUIs - CS2 Module 34 Category: Elements of...

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

View Full Document Right Arrow Icon
CS2 Module 34 Category: Elements of Java Topic: Intro to GUI's Objectives History Containers Components Layout Managers
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS 2 Introduction to Object Oriented Programming Module 34 Elements of Java Introduction to GUI's
Background image of page 2
Agenda Graphical User Interfaces -- overview -- essential elements Containers -- overview -- composition vs. inheritance Components -- examples Layout Managers -- examples
Background image of page 3

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

View Full DocumentRight Arrow Icon
Agenda Graphical User Interfaces -- overview -- essential elements Containers -- overview -- composition vs. inheritance Components -- examples Layout Managers -- examples
Background image of page 4
Graphical User Interface A Graphical User Interface (GUI) is one variety of user interface. . User interacts with objects on the screen (icons, buttons, scroll-bars, etc.) via mouse clicks or keyboard actions. Enter File Edit Open Save Save As. .. Quit Downloading libcrypt . .. 40% Cancel Cancel Ok
Background image of page 5

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

View Full DocumentRight Arrow Icon
GUI Popularity Popularized in 1980s by the Macintosh. Popularized in 1980s by the Macintosh. Now state of the practice, and not final word in UI Now state of the practice, and not final word in UI Intended to replace text-based "command line" and Intended to replace text-based "command line" and "function key" interfaces. "function key" interfaces. Despite similarities, GUIs are typically platform- Despite similarities, GUIs are typically platform- specific (Windows 95/98/NT/1900, MacOS, X specific (Windows 95/98/NT/1900, MacOS, X Windows look-and-feel standards). Windows look-and-feel standards). Some graphical toolkits now provide cross-platform Some graphical toolkits now provide cross-platform APIs. E.g. wxWindows, GTK+, Java. APIs. E.g. wxWindows, GTK+, Java.
Background image of page 6
1. 1. 2. 2. Java’s GUI Capabilities Java provides essentially two related toolkits for making GUIs: The Abstract Windowing Toolkit ("AWT"), and The Java Foundation Classes ("Swing") Swing is merely an expanded version of the AWT, and provides greater control and convenience.
Background image of page 7

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

View Full DocumentRight Arrow Icon
Why Two Toolkits in Java? AWT, then JFC JFC or "Swing" MFC MFC and always "BSoD" Well, it’s a long story. In short, JFC (swing) is Sun’s answer to Microsoft’s MFC--a detailed toolkit library.
Background image of page 8
Cautionary Note Java has two flavors of toolkits: 1. Swing and 2. AWT. It is not wise to mix AWT and Swing Components. For your first programs, stick with one toolkit or the other. We’ll start off with AWT Components to show the basics. Then, we will switch to Swing Components. How do you tell them apart? Generally, but not always, Swing Components will have a "J" in front of the class name: JButton Button AWT Swing
Background image of page 9

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

View Full DocumentRight Arrow Icon
Keep in Mind We will program graphical elements in source code (text). There are drag and drop systems but usually there is an underlying text-based system Eventually you need to get down to the text level Java is designed to work across different platforms.
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 100

CS2_34_IntroToGUIs - CS2 Module 34 Category: Elements of...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online