C H A P T E R 22
In Chapter 21, you created a palette. From this palette you could drag music albums on the top component (which you implemented yourself) via drag-and-drop. As indicated, it is also possible to register a palette for a certain file type. This means that when a file of this type is opened in the NetBeans editor, the palette registered for this type is automatically opened. The following example will show how this actually works.
Let's assume you want to provide a palette for manifest files (.mf) (see Figure 22-1). First you define the items, which will be provided on the palette, each with an XML file and a class. Then you register this item in the layer file. Afterwards, you implement a class that creates a palette ...