In the previous recipe, we saw how to make a desktop GUI application. In this recipe, we'll see how we can add components onto a form and how we can preview the form at the design time.
For more information on using different Swing components, check out http://docs.oracle.com/javase/tutorial/uiswing/components/index.html.
To complete this recipe, we need to have the
JarViewer project that was created in the Creating a Swing application recipe. If you have not completed this recipe, the source code is available with the code download bundle for this chapter.
JarViewerproject is open in NetBeans and double-click on the
MainFrame.javaclass to open it for editing.