What is a GUI?
Graphical windows providing user interaction, accepting keyboard and mouse input.
Name common GUI components.
What is AWT?
Abstract Window Toolkit: Java classes for graphics and GUIs; native component consistency
AWT limitation?
What is Swing?
Library of Java classes (JFC) providing richer, extensible GUI components.
Swing advantages?
What is event-driven programming?
Programs react to events like button clicks; control driven by events.
What is an event listener?
Object executing methods automatically when specific events occur.
How to import Java Swing?
import javax.swing.*;
How to import Java AWT
import java.awt.*
What are Container and Component?
Component is a GUI element; Container holds components or other containers.
How to create a Swing window?
Create a JFrame, add components to its content pane, show frame
What is a top-level container class?
JFrame
How to create a window by inheritance?
Extend JFrame and set up UI in constructor.
Three fundamental Swing components?
What does Swing Components begins with?
J
What is JLabel?
Displays text
What is JTextField?
Single-line user input area
What is JButton?
Clickable button triggering actions
What is JPanel?
Container to group related components; panels added to content pane
What is an event object?
Object containing information about an event; created by source component
What interface must an action listener implement?
ActionListener with method actionPerformed(ActionEvent e)
How to register an action listener?
Call component.addActionListener(listener)
Name two ActionEvent methods.