Products Docs & Support Community

NetBeans Modules and Rich-Client Applications Learning Trail


What is a NetBeans Module?

An NetBeans module, also known as 'plugin', is group of Java classes that provides an application with a specific feature. For example, the feature provided by the Java classes in the NetBeans Google Toolbar Module Tutorial provides a Google search toolbar. The Java classes use the MANIFEST file to declare the module and the layer.xml configuration file to declaratively register their functionality.

NetBeans IDE 5.0 introduced wizards and templates that help you develop NetBeans modules. NetBeans IDE 6.0 provides several major enhancements to the NetBeans APIs, such as the introduction of the Visual Library API and the Schliemann framework for editor support plugins. For a complete list of new and updated NetBeans APIs, click here.

When you have developed a NetBeans module, you can install it in NetBeans IDE or in an application created on top the NetBeans Platform. The NetBeans Platform is the NetBeans application framework, which allows you to quickly prototype and develop your own Swing applications, using the IDE's popular GUI Builder (also known by its code name Matisse) to design your user interface.

By developing your own NetBeans modules, you can extend an application's functionality with new features. For example, you can write modules that make your favorite cutting-edge technologies available to the NetBeans IDE. Alternatively, you might miss some low-level functionality in the Source Editor and create a module to provide it. On a higher level, you can use the core of NetBeans as a platform on top of which you develop rich-client Swing applications, out of NetBeans modules. You can save a lot of development time by reusing features readily available in the platform.

Getting Started

The following two tutorials assume you have no background in NetBeans module development at all. The first shows you how to build a NetBeans module, which is a basic building block for building a rich-client application on the NetBeans Platform. The tutorial that follows shows you how to create your first rich-client application out of NetBeans modules.

Tutorials, Guides, and Demos

Tutorials for Swing Applications Built on top the NetBeans Platform

Once you are familiar with the basics of building NetBeans modules and rich-client applications, having followed the two tutorials in the previous section, and you are specifically interested in creating rich-client applications, you are encouraged to follow the next tutorials. The first, by NetBeans founding member Jaroslav Tulach, demonstrates the concept of assembling an application out of modules selected from the IDE. The second, by regular contributor Rich Unger, is a full blown FeedReader application, available both in PDF format and in HTML. The third tutorial was written by a collection of NetBeans engineers, to explain how to make use of the Java EE 5 specification within the context of an application based on the NetBeans Platform. It is a good idea to work through these tutorials in the order listed here:

NetBeans APIs for Developing or Extending an Editor

To work with a new file type, the IDE (or your own application) must know what it is. Once it knows what it is, you can provide functionality specifically tailored towards the file type. For example, you can provide specific actions, syntax coloring, code snippets, indentation engines, palettes, and drag-and-drop functionality. All these issues are dealt with in the tutorials in this section. The following tutorials do not build on top of each other; you can start with any of them. If you want an end-to-end story, see the "NetBeans POV-Ray Tutorial" further down below.

NetBeans POV-Ray Tutorial

Tim Boudreau's POV-Ray tutorial demonstrates integrating basic support for a new language, and writing a project type for creating projects specific to that language. Even if you are not planning to do those exact things, it will familiarize you with a lot of NetBeans concepts that will be useful in writing any module.

Bundling Supporting Resources

The following tutorials do not require you to know anything about the NetBeans APIs involved. In some cases (such as project templates), the tutorial describes a wizard that installs an application as a new sample in the New Project wizard. Here, no knowledge of the related NetBeans APIs is needed. In other cases (such as the article on autoupdate descriptors), you are shown how to make your applications and NetBeans modules available to others.

New! NetBeans IDE 6.0 Beta Tutorials

NetBeans APIs for Making Selections

Selection is used to make possible such things as context sensitive actions (actions that are enabled or disabled depending on what is displayed), and palette windows such as the Property Sheet or Navigator components in the IDE, which each display some aspect of whatever is selected. This sequential series of tutorials by Tim Boudreau delves into these aspects of the NetBeans APIs, using common scenarios and a lot of illustrative sample code. Each tutorial builds on the previous one, you are therefore recommended to begin with the first below and continue from there.

Miscellaneous NetBeans APIs

The NetBeans APIs discussed in the following tutorials do not directly relate to the subjects covered in the above sections. For example, the first shows how to add a JTextField as a button in the toolbar, while the second shows how to integrate a third party library for checking your GMail account. The third tutorial shows how to extend the Runtime window via the Nodes API. The last tutorial in this section shows you how to create a server-agnostic basis on top of which you can build a server-specific support module for the IDE.

Legacy Tutorials for NetBeans IDE 4.1

Even though the following three documents are in the "legacy" category, they are well worth reading—they are by two external contributors, Tom Wheeler and Sandip Chitale—and give a very practical, detailed introduction to the NetBeans Platform, the NetBeans APIs, and module development in general.

Support

Community-Powered

  • NetBeans Developer FAQs

Professional-Powered

Other Resources