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

Adding components to a form

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.

Tip

For more information on using different Swing components, check out http://docs.oracle.com/javase/tutorial/uiswing/components/index.html.

Getting ready

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.

How to do it…

  1. Ensure that the JarViewer project is open in NetBeans and double-click on the MainFrame.java class to open it for editing.
  2. From the Palette ...

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