Print is a JComponent subclass which knows how to work with the NetBeans window system. If you want to add components to the main window, typically you will subclass TopComponent, using it the same way you would a JPanel.

TopComponents live inside Modes.

TopComponents can have various states:

Each TopComponent has a Lookup and one or more activated Nodes. These define the selection context? for the window system, which determines what actions (menu items, toolbar buttons, etc.) are enabled, and in some cases, what they will do or operate on if invoked.

TopComponents are part of the Windows API.

TopComponents that were already open may be deserialized and reopened on restart. The template that NetBeans 5.0 provides includes code for this - it is actually using saved using the Externalizable interface. Whether or not it is saved is determined by what you return from getPersistenceType().

Source: NetBeans FAQ

Parent Category: Other API Tips