The Basic NetBeans™ Platform Series

The NetBeans™ platform: a first meeting

Volker Rautenberg

Created on 03 June 2007, last updated on 31 May 2009

The NetBeans™ platform is a software framework particularly well suited for Java™ desktop development. Moreover, the platform also is a full stand-alone application with a rich set of features.

Introduction

This is the first article of the Basic NetBeans™ Platform Series. A good place to point out some general prerequisites:

  • Though the NetBeans™ IDE is not a necessary condition to develop NetBeans™-based applications we will assume that you actually do use the NetBeans™ IDE.
  • Also, we expect that you will use a NetBeans™ IDE of the current 6.0 line.
  • It is a assumed that you have a minimum working knowledge of the NetBeans™ IDE as such

All screenshots as well as the operating system (OS) specifics refer to Microsoft® Windows®; nevertheless, you will easily be able to translate these details to your preferred OS.

Getting started

It is interesting to know that the NetBeans™ platform not only is a software framework. The platform has everything on board to be started as an application as well. And even though this plain application will not perform extremely valuable jobs like cleaning your kitchen floor, the application gives noteworthy insights into what the NetBeans™ platform means as a starting point of application development.

Before really launching you may want to create a particular temporary directory for reasons of good housekeeping, because the application creates a set specific directories and files. We use directory %temp%\nbtest in the following. The installation directory of your NetBeans™ IDE will more or less resemble the first screenshot:

Directory structure

Directory structure of a NetBeans™ IDE 6.0 installation

Inside the selected platform7/lib directory there are a couple of files, two of which are relevant here:

Contents of the lib directory

Contents of the platform7/lib directory

File nbexec.exe is the application launcher for Windows®, nbexec the one for most other OS. Open a command line or shell window, change right into the platform7/lib directory of your NetBeans installation and issue a command corresponding to

nbexec --userdir %temp%\nbtest

Start the platform from the command line

Start the plain platform application from the command line

The plain application starts and finally the main window appears:

Plain platform application

The plain NetBeans™ platform application

Rich set of features

From the first look as well as a detailed inspection you will find all features of fully-blown Swing application out-of-the-box and pre-configured

  • a splash-screen,
  • a menu bar,
  • related menu items,
  • a tool bar,
  • related tool bar buttons,
  • a page-setup,
  • default edit actions,
  • an integrated web browser,
  • a memory display in the tool bar,
  • a tool bar customiser,
  • a document navigation,
  • a templage manager,
  • a plug-in manager,
  • an option settings,
  • a favorites window,
  • a properties window,
  • a set of window-related actions,
  • an about box,
  • and last but not least: a runtime container including a module system behind the scenes.

This is the foundation of any NetBeans™-based application. Next, let us take a closer look at the very basic terms and concepts of the NetBeans™ platform in this article.