Chapter 12 in Core Java
1. The defalut layout of JFrame is Borderlayout, and extended to the boundary automatically.
2. The default layout of JPanel is FlowLayout, and centered automatically.
3. In general components are placed inside containers. Each container has a default layout manager, you can set your own by setLayout mehtod.
4. JFrame is a window, which is also a container. JComponent is also a container. All container is a component, which means container can be added to other container.
5. Creating a mehtod like addButton(String,ActionListener) to add buttons to a container in which ActionLisner is a concrete class that implements a ActionListener interface.
6. setLayout(null) means a abosolute postion in a container.
7. Messagebox in VC has a corresponding clas called JOptionPane,
8. In general, a Jpanel using GridLayout is added to the JFrame center, with each grid contains a JPanel. South is often occupied with buttons panel.
9. Use setPreferredSize and pack to set a window size, or equivalently overide getPreferredSize.