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 a Swing application

With NetBeans 8.0, creating a desktop application is very similar to creating a standard console application as shown in Chapter 1, Using NetBeans Projects. To create a Swing application, we need to first create a blank Java application and then add a JFrame derived class to the application that will act as the main frame for the application. Once we've created a frame, we can set its title and give it an icon and we will get a basic Java desktop application.

Let's see how that can be achieved.

Tip

For more information about JFrames and how to use top-level containers, check out http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html.

Getting ready

To complete this recipe, we'll be using the Java SE NetBeans ...

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