In this lesson, you will use the Java visual editor to add a JScrollPane and a JTable to the application. In later exercises, you will program the JTable to get its data from a Web service that returns a list of all the employees in the company directory.
After you add the JTable, you will use the design view of the Java visual editor to customize the layout of the JTable to match the following specifications:
The main window of DirectoryApp.java uses a JFrame with a JPanel for its main content pane. The JPanel in our application is named jContentPane. The jContentPane was set to use a type of layout manager called GridBagLayout. The GridBagLayout is a powerful layout scheme based on a grid of cells that can be occupied by visual components. The Java visual editor makes it easy to work with GridBagLayout by showing the grid borders. It also shows placement markers when you drop new components onto the grid, and it shows handles on components that you are resizing or moving on the GridBagLayout.
To customize the anchor, fill, and insets for the JScrollPane: