Chapter 3. Designing Desktop GUI Applications

In this chapter, we will cover:

  • Creating a Java Desktop Application
  • Creating a Frame
  • Creating a Panel
  • Adding Event Listeners
  • Connecting your application to a database
  • Creating a customized icon for your application
  • Making executable Desktop Applications

Introduction

One of the greatest strengths of NetBeans is the powerful Swing GUI Builder.

It uses Java's Swing as the default framework and with it, it's possible to:

  • Create and design complex GUI applications
  • Drag-and-drop components from a palette component
  • Design beautiful-looking applications
  • Previewing the changes before compiling
  • Possibility to bind data straight from the Database to your component

And it's possible to do much more.

Besides being totally free, the Swing GUI Builder lets the developer concentrate on coding.

To learn more about Swing development, you can refer the following book:

https://www.packtpub.com/netbeans-platform-6-9-developers-guide/book

Starting with the basics, we will see how to create a simple Java Desktop Application and then build on that by adding panels, GUI controls, and connections to databases.

Furthermore, we'll also cover details like customizing the icon of the applications and creating executables for easier distribution. This will give a more professional look to the applications.

Another great thing about the Swing GUI Builder is that it can be extended with other frameworks, and not just plain Swing. We will show you how to extend a default component palette with an additional SwingX widget.

For more details about SwingX, please visit:

https://swingx.dev.java.net/

In this recipe we will be using, as with throughout the entire book, the Java SDK 6 that can be found at:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

and NetBeans Java version, since it will support Java SE, Platform, and bundled servers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.229.143