In Chapter 22, “Swing Basics” you learned about AWT and Swing components. This chapter is the second installment of Swing and discusses techniques that you invariably use in Swing programming: layout management and event handling. In addition, there is discussion about menus, the look and feel, fast splash screens, the system tray and Java Desktop.
A container, such as a JFrame and a JDialog, needs a java.awt.LayoutManager to lay out child components. A LayoutManager resizes and positions all child components, as well as rearranges the components when the container is resized. The java.awt.Container class has a setLayout method for adding a layout manager. Since javax.swing.JComponent extends Container ...