GUIs Flashcards
What does MVC stand for?
Model-View-Controller
What is each part of the MVC?
Model - How information is represented internally
View - How information is presented externally
Controller - User input
What part of MVC does Java method calls fit into?
Model
What part of MVC do mouse or keyboard events fit into?
Controller
What part of MVC does the outward appearance of a program fit into?
View
What does GUI stand for?
Graphical User Interface
What does WIMP stand for?
Windows, Icons, Menus, Pointers
What are modern GUI libraries usually called?
Toolkits
What do modern GUI libraries usually contain?
Widgets
What are some examples of widgets?
Buttons, Sliders, Menus
Containers which give structure to the GUI
What are the 2 java GUI libraries?
java. awt (abstract windowing toolkit)
javax. swing (swing library)
How do swing components distinguish themselves from awt components?
They have “J” in front of them (e.g. JList, JMenu)
What is a JFrame?
A window for a GUI in java
How do you create a JFrame object?
JFrame frameName = new JFrame(“frame name”);
What are the 4 options for setDefaultCloseOperation on a JFrame?
DO_NOTHING_ON_CLOSE
HIDE_ON_CLOSE (the default)
DISPOSE_ON_CLOSE (usually best for non-main frame)
EXIT_ON_CLOSE (implemented directly in JFrame and should usually only be done for the main frame)