O'Reilly logo

NetBeans IDE 8 Cookbook by Rhawi Dantas, David Salter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating toolbars

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.

Getting ready

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.

How to do it…

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:

  1. From the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required