GUI Flashcards
Graphical User Interfaces (GUI’s) are made up of components such as buttons, text fields, labels, etc.
To hold these components, we need to create some sort of ____ ____?
container object. A container object is designed to hold other GUI objects. (T!)
Which panes are created automatically when you creat a JFrame object?
JLayeredPane (holds menu bar object)
Content pane
Screen co-ordinates start at the?
upper left hand corner of the screen.
X values increase from left to right
Y values increase from top to bottom of the screen
What is a layout manager?
Layout managers are utility classes that are part of the original java.AWT package.
They are used to control the placement of components within containers such as JFrames or JPanels according to some pre-defined patterns.
All layout manager classes implement the methods contained in the interface called LayoutManager (look it up in the Java docs!)
A layout manager will take into account things like current screen resolution, size of components, and how they are to be laid out, and will do all of the positioning grunt work for you.
If the app user changes the screen resolution on their device, the layout manager will look after revising thing based on the new resolution setting when the app is loaded.
What is the default layout of a JFrame?
divided into five zones: North, South, East, West and center
Each zone can hold one component. If you put more than one component in a zone, only the last one will be visible.
What is stored in javax.swing
all the gui objects
what is stored in java.awt
layout managers