The final stage of designing the GUI for our application is to add a toolbar with a button on it. Clicking on the button on the toolbar will cause the contents of selected
.jar files to be displayed.
To complete this recipe, we need to have the
JarViewer project that was created in the Creating dialogs recipe. If you have not completed this recipe, the source code is available with the code download bundle for this chapter.
Since we are adding a toolbar to the main form of our application, we need to make sure that the form is open and ready for designing. Double-click on the
MainFrame.java file in the Projects explorer and ensure the Design surface is visible, and perform the following steps: