protected JComponent createContentPane() {

    JPanel panel = new JPanel();
    BoxLayout layout = new BoxLayout(panel, BoxLayout.Y_AXIS);
    panel.setLayout(layout);

    TitlePane titlePane = new TitlePane(5);
    titlePane.setTitle(Context.getMessage("CreateBagsPanel.title"));
    titlePane.setMessage(new DefaultMessage(Context.getMessage("CreateBagsPanel.description")));
    JComponent titleComponent = titlePane.getControl();
    panel.add(titleComponent);

    panel.add(new JSeparator(), BorderLayout.SOUTH);

    JComponent form = getCreateBagsParamsForm().getControl();
    form.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    panel.add(form);

    JComponent buttonPanel = createButtonPanel();
    buttonPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    panel.add(buttonPanel);

    getLabelStatistics().setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    panel.add(getLabelStatistics());

    JTable table = (JTable) getCreateBagResultTable().getControl();
    final Dimension tDimension = new Dimension(400, 200);
    JScrollPane scroller = new JScrollPane(table);
    scroller.setPreferredSize(tDimension);
    scroller.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    panel.add(scroller);

    return panel;
  }
  /** @return JComponent with titlePane, widgetContent and border. */
  private JComponent createComponent() {
    JPanel titlePaneContainer = new JPanel(new BorderLayout());
    titlePaneContainer.add(titlePane.getControl());
    titlePaneContainer.add(new JSeparator(), BorderLayout.SOUTH);

    JPanel pageControl = new JPanel(new BorderLayout());
    pageControl.add(titlePaneContainer, BorderLayout.NORTH);
    JComponent content = createWidgetContent();
    GuiStandardUtils.attachDialogBorder(content);
    pageControl.add(content);

    return pageControl;
  }
 public void setMessage(Message message) {
   if (message != null) titlePane.setMessage(message);
   else titlePane.setMessage(getDescription());
 }