code: public static JPanel wrapTitled(String title, JComponent component)
      {
          JPanel p = new JPanel(new GridLayout(1,1));
          p.setBorder(BorderFactory.createTitledBorder(title));
          p.add(component);
          return p;
      }
docs: Wrap the given component into a panel with a titled border with
  the given title
  
  @param title The title
  @param component The component
  @return The panel