Java Reference
In-Depth Information
setEditable
javax.swing.JComponent
setBorder
setFont
javax.swing.JFrame
setJMenuBar
javax.swing.JMenu
add
javax.swing.JMenuBar
add
javax.swing.JMenuItem
javax.swing.JRadioButton
javax.swing.JScrollPane
javax.swing.JSlider
addChangeListener
getValue
javax.swing.border.EtchedBorder
javax.swing.border.TitledBorder
javax.swing.event.ChangeEvent
javax.swing.event.ChangeListener
stateChanged
815
816
REVIEW EXERCISES
GExercise R18.1. Can you use a flow layout for the components in a frame?
If yes, how?
GExercise R18.2. What is the advantage of a layout manager over telling the
container Ȓplace this component at position (x, y)ȓ?
GExercise R18.3. What happens when you place a single button into the
CENTER
area of a container that uses a border layout? Try it out, by
writing a small sample program, if you aren't sure of the answer.
GExercise R18.4. What happens if you place multiple buttons directly into
the SOUTH area, without using a panel? Try it out, by writing a small
sample program, if you aren't sure of the answer.
GExercise R18.5. What happens when you add a button to a container that
uses a border layout and omit the position? Try it out and explain.