Using API Templates

A number of useful templates for API objects are added to your templates area. In most cases, groups are used so you can create a whole set of related classes (including an icon) at once. All are under NetBeans Extensions in your templates directory.

Each group of templates, and each major template, has an accompanying description to give you an idea of what that template is for and what you can customize in it. Please browse through these descriptions if you are not familiar with the types of objects involved.

When using groups, normally you instantiate the whole group. When instantiating a group, e.g. Cookie Action, give a simple name unique to your task like Rot13 in the dialog--then you will get e.g. Rot13Action and Rot13ActionIcon. By default the constituent files are not marked as templates and will not appear in the New wizard. If you wish to use one file at a time as a template, simply find it under Tools | Options | ... | Templates | NetBeans Extensions and set Template to True. When instantiating these outside a group, choose the exact name you wish the result to have, e.g. Rot13Action.

Warning: these templates are primarily designed for use with NetBeans 3.3 and later, although with some care most are also suitable for earlier versions of the IDE: you will have to be careful to avoid using newer API features.