public JScrollPane (Component view)

Creates a JScrollPane that displays the contents of the specified component, where both horizontal and vertical scrollbars appear whenever the component's contents are larger than the view.

Parameters:
view    the component to display in the scrollpane's viewport

See also:
setViewportView