Create a subclass of TopComponent. Design it just as you would a JPanel (hint: in NetBeans, use the JPanel template to create a new JPanel with the form editor, and change the parent class to

Create a simple subclass of javax.swing.AbstractAction and add it to the main menu. Implement it to open your component:

 public class MyAction extends AbstractAction {
   public MyAction() {
      putValue (Action.NAME, "Open My Component");

   public void actionPerformed(ActionEvent ae) {
      new MyComponent().open();

Eventually, you will probably want to have your module use the declarative XML API to install your components; the above advice is good for testing.

TopComponents are part of the Windows API.