In the next step, we will create a JPanel.
A JPanel can incorporate many different combinations of components and behaviors. This way, it is possible to interchange the Panels on top of the Frame and let other behavior take place at the window.
Each JPanel is configured with a layout; the layout determines how the components will be arranged on the top of the panel. NetBeans makes it easy to change the layouts with a click of a button.
It is necessary to have the source of a Java Desktop project open in NetBeans. Many of the files created in this recipe build upon previous recipes in this chapter, because we wish to give continuity to the recipes.
The project and file name references come from the other recipes in this chapter, so feel free to use the same naming if not confident enough.
It is necessary to have an empty JFrame form so the JPanel can be used.