Example usage for javax.swing JViewport add

List of usage examples for javax.swing JViewport add

Introduction

In this page you can find the example usage for javax.swing JViewport add.

Prototype

public Component add(Component comp) 

Source Link

Document

Appends the specified component to the end of this container.

Usage

From source file:org.openmicroscopy.shoola.agents.metadata.editor.GeneralPaneUI.java

/** Builds and lays out the components. */
private void buildGUI() {
    setLayout(new BorderLayout(0, 0));
    container.add(propertiesTaskPane);/*w w w  .j av a2s . c o m*/
    container.add(annotationTaskPane);
    pane = new JScrollPane();
    JViewport viewport = pane.getViewport();
    viewport.add(container);
    viewport.setBackground(UIUtilities.BACKGROUND_COLOR);
    add(toolbar, BorderLayout.NORTH);
    add(pane, BorderLayout.CENTER);
}