In this chapter, we reviewed the basics of creating graphical user interfaces, or GUIs, for our programs. We learned about GUI frameworks such as Java Swing and Python tkinter, and how to use them.
We saw that applications are contained within windows, which are managed by the window manager, part of the operating system that our applications are running under. Inside of those windows, we can place controls such as panels, labels, text inputs, and more. To arrange those elements, we can use a layout manager.
We then learned how to create a simple “Hello World” GUI in both Java Swing and Python tkinter, which will serve as the basis for the example project attached to this chapter.
In later parts of this course, we’ll learn how to react to the various events that are generated by our GUI using event-driven programming.
Review Quiz
Check your understanding of the new content introduced in this chapter below - this quiz is not graded and you can retake it as many times as you want.
---
primaryColor: '#512888'
secondaryColor: '#cccccc'
textColor: black
shuffleQuestions: true
shuffleAnswers: true
locale: en
---
# GUI
The initialism **GUI** stands for what concept in computer programming?
1. [X] Graphical User Interface
1. [ ] Graphics Under Input
1. [ ] Game Under Intervals
1. [ ] Graph User Intelligence
# Pixels
The size of the computer screen, including number of pixels available, is referred to by what term?
1. [X] Screen Resolution
1. [ ] Megapixels
1. [ ] Dots Per Inch (DPI)
1. [ ] Diagonal
# Tools
Tools such as **Java Swing** and **Python tkinter** are referred to by what collective name?
1. [X] Graphics Frameworks
1. [ ] Archive Files
1. [ ] EPIC Softwares
1. [ ] Monitors
# Exclusive
True or false: Java Swing and Python tkinter are the **only** ways to develop GUIs for those respective languages?
1. [X] False
1. [ ] True
# First Step
When creating a user interface, which of the following is a very common first step?
1. [X] GUI Sketches
1. [ ] Unit Tests
1. [ ] Code Reviews
1. [ ] Acceptance Tests
# Accessibility
In graphical interface design, **accessibility** is broadly defined as what concern?
1. [X] How well users of various skills and abilities can use an interface
1. [ ] The behaviors of the user interface
1. [ ] The look and feel of the user interface
1. [ ] The colors and shapes used in the user interface
# Top Container
In a graphical interface for a program, the top-most container is referred to by what term?
1. [X] Window
1. [ ] Panel
1. [ ] Layout Manager
1. [ ] Operating System
# Inner Container
Inside of the top-most container of a program, most controls and elements in a graphical interface are contained in a generic container known by what name?
1. [ ] Window
1. [X] Panel
1. [ ] Layout Manager
1. [ ] Operating System
# Layout Manager
In a graphical interface, a **layout manager** performs what task?
1. [X] Automatically resizes and positions elements in a panel
1. [ ] Determines which windows should be visible
1. [ ] Chooses the elements to place on the screen
1. [ ] Changes the skin of the user interface
# Layout Options
Both Java Swing and Python tkinter support layout managers that arrange controls using what method?
1. [X] Grid
1. [ ] Circle
1. [ ] Flex
1. [ ] Border
# Descriptive Text
Which GUI control is commonly used to add descriptive text to a user interface?
1. [X] Label
1. [ ] Text Input
1. [ ] Button
1. [ ] Combo Box
# Click
Which GUI control is commonly used to provide users an area to click to perform an action?
1. [ ] Label
1. [ ] Text Input
1. [X] Button
1. [ ] Combo Box
# List and Text
Which GUI control is commonly used to provide users both a text input and a list of options?
1. [ ] Label
1. [ ] List Box
1. [ ] Button
1. [X] Combo Box
# Text
Which GUI control is commonly used to provide users a space to input text?
1. [ ] Label
1. [X] Text Input
1. [ ] Button
1. [ ] Combo Box
# X Windows
The **X Window System** on Linux is used for what task?
1. [X] Drawing windows on the screen
1. [ ] Logging in to Windows
1. [ ] Browsing the web
1. [ ] Running a program in protected mode
# Button Click
In both Java Swing and Python tkinter, clicking a button in a graphical user interface causes what to happen in the program?
1. [X] A function is called
1. [ ] An attribute's value is changed
1. [ ] An object is created
1. [ ] The program creates a new thread