code: public static JPanel wrapFlow(JComponent component)
      {
          JPanel p = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
          p.add(component);
          return p;
      }
docs: Wrap the given component into a panel with flow layout
  
  @param component The component
  @return The panel