/** Initializes the components and adds them to the container. Called by the constructor. */
  private void layoutComponents() {
    MigLayout layout =
        new MigLayout(
            "hidemode 2, insets 0 0 0 0, gap 0!, novisualpadding",
            "[][grow]", // col constraints
            "[][][][grow]"); // row constraints

    setLayout(layout);
    setMinimumSize(new Dimension(getPreferredSize().width, 33));

    RectanglePainter tabHighlight = new RectanglePainter();
    tabHighlight.setFillPaint(
        new GradientPaint(
            20.0f,
            0.0f,
            tabHighlightTopGradientColor,
            20.0f,
            33.0f,
            tabHighlightBottomGradientColor));

    tabHighlight.setInsets(new Insets(0, 0, 1, 0));
    tabHighlight.setBorderPaint(null);

    HeaderBar header = new HeaderBar(searchTitleLabel);
    header.setLayout(new MigLayout("insets 0, gap 0!, novisualpadding, alignx 100%, aligny 50%"));
    header.add(browseStatusPanel, "alignx 0%, growx, pushx");
    headerBarDecorator.decorateBasic(header);

    sortAndFilterPanel.layoutComponents(header);

    add(header, "spanx 2, growx, growy, wrap");
    add(classicSearchReminderPanel, "spanx 2, growx, wrap");
    add(messagePanel, "spanx 2, growx, wrap");
    add(filterPanel, "grow");
    add(scrollPane, "hidemode 3, grow");
    add(browseFailedPanel, "hidemode 3, grow");

    scrollablePanel.setScrollableTracksViewportHeight(false);

    scrollablePanel.setLayout(new BorderLayout());
    scrollablePanel.add(resultsContainer, BorderLayout.CENTER);
    scrollablePanel.add(sponsoredResultsPanel, BorderLayout.EAST);
    scrollPane.setViewportView(scrollablePanel);

    syncScrollPieces();
  }
 /** Updates the view components in the scroll pane. */
 private void syncScrollPieces() {
   scrollablePanel.setScrollable(resultsContainer.getScrollable());
   syncColumnHeader();
 }