The Form Editor is a very good example for using the palette module. The Form Editor places its AWT and Swing components on the palette (see Figure 21-1). These components can then be moved via drag-and-drop. You can also add components to the palette during runtime. The content of the palette window is managed and provided by a
PaletteController. Such a
PaletteController can be made available by a top component via the Lookup. This means that as soon as a top component, in whose Lookup is located a
PaletteController instance, becomes active, the palette window is opened and its content is displayed. A
PaletteController is created via the
PaletteFactory class. There are two ways to provide the components. You can either ...