javax.swing
Class JScrollPane

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.Component sample code for java.awt.Component definition code for java.awt.Component 
      extended by java.awt.Container sample code for java.awt.Container definition code for java.awt.Container 
          extended by javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent 
              extended by javax.swing.JScrollPane
All Implemented Interfaces:
ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver , MenuContainer sample code for java.awt.MenuContainer definition code for java.awt.MenuContainer , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible , ScrollPaneConstants sample code for javax.swing.ScrollPaneConstants definition code for javax.swing.ScrollPaneConstants

public class JScrollPane
extends JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
implements ScrollPaneConstants sample code for javax.swing.ScrollPaneConstants definition code for javax.swing.ScrollPaneConstants , Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible

Provides a scrollable view of a lightweight component. A JScrollPane manages a viewport, optional vertical and horizontal scroll bars, and optional row and column heading viewports. You can find task-oriented documentation of JScrollPane in How to Use Scroll Panes, a section in The Java Tutorial. Note that JScrollPane does not support heavyweight components.

The following text describes this image.

The JViewport provides a window, or "viewport" onto a data source -- for example, a text file. That data source is the "scrollable client" (aka data model) displayed by the JViewport view. A JScrollPane basically consists of JScrollBars, a JViewport, and the wiring between them, as shown in the diagram at right.

In addition to the scroll bars and viewport, a JScrollPane can have a column header and a row header. Each of these is a JViewport object that you specify with setRowHeaderView, and setColumnHeaderView. The column header viewport automatically scrolls left and right, tracking the left-right scrolling of the main viewport. (It never scrolls vertically, however.) The row header acts in a similar fashion.

By default, the corners are empty. You can put a component into a corner using setCorner, in case you there is some function or decoration you would like to add to the scroll pane. The size of corner components is entirely determined by the size of the headers and scroll bars that surround them.

To add a border around the main viewport, you can use setViewportBorder. (Of course, you can also add a border around the whole scroll pane using setBorder.)

A common operation to want to do is to set the background color that will be used if the main viewport view is smaller than the viewport, or is not opaque. This can be accomplished by setting the background color of the viewport, via scrollPane.getViewport().setBackground(). The reason for setting the color of the viewport and not the scrollpane is that by default JViewport is opaque which, among other things, means it will completely fill in its background using its background color. Therefore when JScrollPane draws its background the viewport will usually draw over it.

By default JScrollPane uses ScrollPaneLayout to handle the layout of its child Components. ScrollPaneLayout determines the size to make the viewport view in one of two ways:

  1. If the view implements Scrollable a combination of getPreferredScrollableViewportSize, getScrollableTracksViewportWidth and getScrollableTracksViewportHeightis used, otherwise
  2. getPreferredSize is used.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar , JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport , ScrollPaneLayout sample code for javax.swing.ScrollPaneLayout definition code for javax.swing.ScrollPaneLayout , Scrollable sample code for javax.swing.Scrollable definition code for javax.swing.Scrollable , Component.getPreferredSize() sample code for java.awt.Component.getPreferredSize() definition code for java.awt.Component.getPreferredSize() , setViewportView(java.awt.Component) sample code for javax.swing.JScrollPane.setViewportView(java.awt.Component) definition code for javax.swing.JScrollPane.setViewportView(java.awt.Component) , setRowHeaderView(java.awt.Component) sample code for javax.swing.JScrollPane.setRowHeaderView(java.awt.Component) definition code for javax.swing.JScrollPane.setRowHeaderView(java.awt.Component) , setColumnHeaderView(java.awt.Component) sample code for javax.swing.JScrollPane.setColumnHeaderView(java.awt.Component) definition code for javax.swing.JScrollPane.setColumnHeaderView(java.awt.Component) , setCorner(java.lang.String, java.awt.Component) sample code for javax.swing.JScrollPane.setCorner(java.lang.String, java.awt.Component) definition code for javax.swing.JScrollPane.setCorner(java.lang.String, java.awt.Component) , setViewportBorder(javax.swing.border.Border) sample code for javax.swing.JScrollPane.setViewportBorder(javax.swing.border.Border) definition code for javax.swing.JScrollPane.setViewportBorder(javax.swing.border.Border) , Serialized Form

Nested Class Summary
protected  class JScrollPane.AccessibleJScrollPane sample code for javax.swing.JScrollPane.AccessibleJScrollPane definition code for javax.swing.JScrollPane.AccessibleJScrollPane
          This class implements accessibility support for the JScrollPane class.
protected  class JScrollPane.ScrollBar sample code for javax.swing.JScrollPane.ScrollBar definition code for javax.swing.JScrollPane.ScrollBar
          By default JScrollPane creates scrollbars that are instances of this class.
 
Nested classes/interfaces inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
JComponent.AccessibleJComponent sample code for javax.swing.JComponent.AccessibleJComponent definition code for javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container sample code for java.awt.Container definition code for java.awt.Container
Container.AccessibleAWTContainer sample code for java.awt.Container.AccessibleAWTContainer definition code for java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
Component.AccessibleAWTComponent sample code for java.awt.Component.AccessibleAWTComponent definition code for java.awt.Component.AccessibleAWTComponent , Component.BltBufferStrategy sample code for java.awt.Component.BltBufferStrategy definition code for java.awt.Component.BltBufferStrategy , Component.FlipBufferStrategy sample code for java.awt.Component.FlipBufferStrategy definition code for java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport columnHeader sample code for javax.swing.JScrollPane.columnHeader definition code for javax.swing.JScrollPane.columnHeader
          The column header child.
protected  JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar horizontalScrollBar sample code for javax.swing.JScrollPane.horizontalScrollBar definition code for javax.swing.JScrollPane.horizontalScrollBar
          The scrollpane's horizontal scrollbar child.
protected  int horizontalScrollBarPolicy sample code for javax.swing.JScrollPane.horizontalScrollBarPolicy definition code for javax.swing.JScrollPane.horizontalScrollBarPolicy
          The display policy for the horizontal scrollbar.
protected  Component sample code for java.awt.Component definition code for java.awt.Component lowerLeft sample code for javax.swing.JScrollPane.lowerLeft definition code for javax.swing.JScrollPane.lowerLeft
          The component to display in the lower left corner.
protected  Component sample code for java.awt.Component definition code for java.awt.Component lowerRight sample code for javax.swing.JScrollPane.lowerRight definition code for javax.swing.JScrollPane.lowerRight
          The component to display in the lower right corner.
protected  JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport rowHeader sample code for javax.swing.JScrollPane.rowHeader definition code for javax.swing.JScrollPane.rowHeader
          The row header child.
protected  Component sample code for java.awt.Component definition code for java.awt.Component upperLeft sample code for javax.swing.JScrollPane.upperLeft definition code for javax.swing.JScrollPane.upperLeft
          The component to display in the upper left corner.
protected  Component sample code for java.awt.Component definition code for java.awt.Component upperRight sample code for javax.swing.JScrollPane.upperRight definition code for javax.swing.JScrollPane.upperRight
          The component to display in the upper right corner.
protected  JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar verticalScrollBar sample code for javax.swing.JScrollPane.verticalScrollBar definition code for javax.swing.JScrollPane.verticalScrollBar
          The scrollpane's vertical scrollbar child.
protected  int verticalScrollBarPolicy sample code for javax.swing.JScrollPane.verticalScrollBarPolicy definition code for javax.swing.JScrollPane.verticalScrollBarPolicy
          The display policy for the vertical scrollbar.
protected  JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport viewport sample code for javax.swing.JScrollPane.viewport definition code for javax.swing.JScrollPane.viewport
          The scrollpane's viewport child.
 
Fields inherited from class javax.swing.JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent
accessibleContext sample code for javax.swing.JComponent.accessibleContext definition code for javax.swing.JComponent.accessibleContext , listenerList sample code for javax.swing.JComponent.listenerList definition code for javax.swing.JComponent.listenerList , TOOL_TIP_TEXT_KEY sample code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY definition code for javax.swing.JComponent.TOOL_TIP_TEXT_KEY , ui sample code for javax.swing.JComponent.ui definition code for javax.swing.JComponent.ui , UNDEFINED_CONDITION sample code for javax.swing.JComponent.UNDEFINED_CONDITION definition code for javax.swing.JComponent.UNDEFINED_CONDITION , WHEN_ANCESTOR_OF_FOCUSED_COMPONENT sample code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT definition code for javax.swing.JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT , WHEN_FOCUSED sample code for javax.swing.JComponent.WHEN_FOCUSED definition code for javax.swing.JComponent.WHEN_FOCUSED , WHEN_IN_FOCUSED_WINDOW sample code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW definition code for javax.swing.JComponent.WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component sample code for java.awt.Component definition code for java.awt.Component
BOTTOM_ALIGNMENT sample code for java.awt.Component.BOTTOM_ALIGNMENT definition code for java.awt.Component.BOTTOM_ALIGNMENT , CENTER_ALIGNMENT sample code for java.awt.Component.CENTER_ALIGNMENT definition code for java.awt.Component.CENTER_ALIGNMENT , LEFT_ALIGNMENT sample code for java.awt.Component.LEFT_ALIGNMENT definition code for java.awt.Component.LEFT_ALIGNMENT , RIGHT_ALIGNMENT sample code for java.awt.Component.RIGHT_ALIGNMENT definition code for java.awt.Component.RIGHT_ALIGNMENT , TOP_ALIGNMENT sample code for java.awt.Component.TOP_ALIGNMENT definition code for java.awt.Component.TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.ScrollPaneConstants sample code for javax.swing.ScrollPaneConstants definition code for javax.swing.ScrollPaneConstants
COLUMN_HEADER sample code for javax.swing.ScrollPaneConstants.COLUMN_HEADER definition code for javax.swing.ScrollPaneConstants.COLUMN_HEADER , HORIZONTAL_SCROLLBAR sample code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR definition code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR , HORIZONTAL_SCROLLBAR_ALWAYS sample code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS definition code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS , HORIZONTAL_SCROLLBAR_AS_NEEDED sample code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED definition code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED , HORIZONTAL_SCROLLBAR_NEVER sample code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER definition code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER , HORIZONTAL_SCROLLBAR_POLICY sample code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_POLICY definition code for javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_POLICY , LOWER_LEADING_CORNER sample code for javax.swing.ScrollPaneConstants.LOWER_LEADING_CORNER definition code for javax.swing.ScrollPaneConstants.LOWER_LEADING_CORNER , LOWER_LEFT_CORNER sample code for javax.swing.ScrollPaneConstants.LOWER_LEFT_CORNER definition code for javax.swing.ScrollPaneConstants.LOWER_LEFT_CORNER , LOWER_RIGHT_CORNER sample code for javax.swing.ScrollPaneConstants.LOWER_RIGHT_CORNER definition code for javax.swing.ScrollPaneConstants.LOWER_RIGHT_CORNER , LOWER_TRAILING_CORNER sample code for javax.swing.ScrollPaneConstants.LOWER_TRAILING_CORNER definition code for javax.swing.ScrollPaneConstants.LOWER_TRAILING_CORNER , ROW_HEADER sample code for javax.swing.ScrollPaneConstants.ROW_HEADER definition code for javax.swing.ScrollPaneConstants.ROW_HEADER , UPPER_LEADING_CORNER sample code for javax.swing.ScrollPaneConstants.UPPER_LEADING_CORNER definition code for javax.swing.ScrollPaneConstants.UPPER_LEADING_CORNER , UPPER_LEFT_CORNER sample code for javax.swing.ScrollPaneConstants.UPPER_LEFT_CORNER definition code for javax.swing.ScrollPaneConstants.UPPER_LEFT_CORNER , UPPER_RIGHT_CORNER sample code for javax.swing.ScrollPaneConstants.UPPER_RIGHT_CORNER definition code for javax.swing.ScrollPaneConstants.UPPER_RIGHT_CORNER , UPPER_TRAILING_CORNER sample code for javax.swing.ScrollPaneConstants.UPPER_TRAILING_CORNER definition code for javax.swing.ScrollPaneConstants.UPPER_TRAILING_CORNER , VERTICAL_SCROLLBAR sample code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR definition code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR , VERTICAL_SCROLLBAR_ALWAYS sample code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS definition code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS , VERTICAL_SCROLLBAR_AS_NEEDED sample code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED definition code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED , VERTICAL_SCROLLBAR_NEVER sample code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER definition code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER , VERTICAL_SCROLLBAR_POLICY sample code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_POLICY definition code for javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_POLICY , VIEWPORT sample code for javax.swing.ScrollPaneConstants.VIEWPORT definition code for javax.swing.ScrollPaneConstants.VIEWPORT
 
Fields inherited from interface java.awt.image.ImageObserver sample code for java.awt.image.ImageObserver definition code for java.awt.image.ImageObserver
ABORT sample code for java.awt.image.ImageObserver.ABORT definition code for java.awt.image.ImageObserver.ABORT , ALLBITS sample code for java.awt.image.ImageObserver.ALLBITS definition code for java.awt.image.ImageObserver.ALLBITS , ERROR sample code for java.awt.image.ImageObserver.ERROR definition code for java.awt.image.ImageObserver.ERROR , FRAMEBITS sample code for java.awt.image.ImageObserver.FRAMEBITS definition code for java.awt.image.ImageObserver.FRAMEBITS , HEIGHT sample code for java.awt.image.ImageObserver.HEIGHT definition code for java.awt.image.ImageObserver.HEIGHT , PROPERTIES sample code for java.awt.image.ImageObserver.PROPERTIES definition code for java.awt.image.ImageObserver.PROPERTIES , SOMEBITS sample code for java.awt.image.ImageObserver.SOMEBITS definition code for java.awt.image.ImageObserver.SOMEBITS , WIDTH sample code for java.awt.image.ImageObserver.WIDTH definition code for java.awt.image.ImageObserver.WIDTH
 
Constructor Summary
JScrollPane sample code for javax.swing.JScrollPane.JScrollPane() definition code for javax.swing.JScrollPane.JScrollPane() ()
          Creates an empty (no viewport view) JScrollPane where both horizontal and vertical scrollbars appear when needed.
JScrollPane sample code for javax.swing.JScrollPane.JScrollPane(java.awt.Component) definition code for javax.swing.JScrollPane.JScrollPane(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.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.
JScrollPane sample code for javax.swing.JScrollPane.JScrollPane(java.awt.Component, int, int) definition code for javax.swing.JScrollPane.JScrollPane(java.awt.Component, int, int) (Component sample code for java.awt.Component definition code for java.awt.Component  view, int vsbPolicy, int hsbPolicy)
          Creates a JScrollPane that displays the view component in a viewport whose view position can be controlled with a pair of scrollbars.
JScrollPane sample code for javax.swing.JScrollPane.JScrollPane(int, int) definition code for javax.swing.JScrollPane.JScrollPane(int, int) (int vsbPolicy, int hsbPolicy)
          Creates an empty (no viewport view) JScrollPane with specified scrollbar policies.
 
Method Summary
 JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar createHorizontalScrollBar sample code for javax.swing.JScrollPane.createHorizontalScrollBar() definition code for javax.swing.JScrollPane.createHorizontalScrollBar() ()
          Returns a JScrollPane.ScrollBar by default.
 JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar createVerticalScrollBar sample code for javax.swing.JScrollPane.createVerticalScrollBar() definition code for javax.swing.JScrollPane.createVerticalScrollBar() ()
          Returns a JScrollPane.ScrollBar by default.
protected  JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport createViewport sample code for javax.swing.JScrollPane.createViewport() definition code for javax.swing.JScrollPane.createViewport() ()
          Returns a new JViewport by default.
 AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext getAccessibleContext sample code for javax.swing.JScrollPane.getAccessibleContext() definition code for javax.swing.JScrollPane.getAccessibleContext() ()
          Gets the AccessibleContext associated with this JScrollPane.
 JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport getColumnHeader sample code for javax.swing.JScrollPane.getColumnHeader() definition code for javax.swing.JScrollPane.getColumnHeader() ()
          Returns the column header.
 Component sample code for java.awt.Component definition code for java.awt.Component getCorner sample code for javax.swing.JScrollPane.getCorner(java.lang.String) definition code for javax.swing.JScrollPane.getCorner(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  key)
          Returns the component at the specified corner.
 JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar getHorizontalScrollBar sample code for javax.swing.JScrollPane.getHorizontalScrollBar() definition code for javax.swing.JScrollPane.getHorizontalScrollBar() ()
          Returns the horizontal scroll bar that controls the viewport's horizontal view position.
 int getHorizontalScrollBarPolicy sample code for javax.swing.JScrollPane.getHorizontalScrollBarPolicy() definition code for javax.swing.JScrollPane.getHorizontalScrollBarPolicy() ()
          Returns the horizontal scroll bar policy value.
 JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport getRowHeader sample code for javax.swing.JScrollPane.getRowHeader() definition code for javax.swing.JScrollPane.getRowHeader() ()
          Returns the row header.
 ScrollPaneUI sample code for javax.swing.plaf.ScrollPaneUI definition code for javax.swing.plaf.ScrollPaneUI getUI sample code for javax.swing.JScrollPane.getUI() definition code for javax.swing.JScrollPane.getUI() ()
          Returns the look and feel (L&F) object that renders this component.
 String sample code for java.lang.String definition code for java.lang.String getUIClassID sample code for javax.swing.JScrollPane.getUIClassID() definition code for javax.swing.JScrollPane.getUIClassID() ()
          Returns the suffix used to construct the name of the L&F class used to render this component.
 JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar getVerticalScrollBar sample code for javax.swing.JScrollPane.getVerticalScrollBar() definition code for javax.swing.JScrollPane.getVerticalScrollBar() ()
          Returns the vertical scroll bar that controls the viewports vertical view position.
 int getVerticalScrollBarPolicy sample code for javax.swing.JScrollPane.getVerticalScrollBarPolicy() definition code for javax.swing.JScrollPane.getVerticalScrollBarPolicy() ()
          Returns the vertical scroll bar policy value.
 JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport getViewport sample code for javax.swing.JScrollPane.getViewport() definition code for javax.swing.JScrollPane.getViewport() ()
          Returns the current JViewport.
 Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border getViewportBorder sample code for javax.swing.JScrollPane.getViewportBorder() definition code for javax.swing.JScrollPane.getViewportBorder() ()
          Returns the Border object that surrounds the viewport.
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getViewportBorderBounds sample code for javax.swing.JScrollPane.getViewportBorderBounds() definition code for javax.swing.JScrollPane.getViewportBorderBounds() ()
          Returns the bounds of the viewport's border.
 boolean isValidateRoot sample code for javax.swing.JScrollPane.isValidateRoot() definition code for javax.swing.JScrollPane.isValidateRoot() ()
          Overridden to return true so that any calls to revalidate on any descendants of this JScrollPane will cause the entire tree beginning with this JScrollPane to be validated.
 boolean isWheelScrollingEnabled sample code for javax.swing.JScrollPane.isWheelScrollingEnabled() definition code for javax.swing.JScrollPane.isWheelScrollingEnabled() ()
          Indicates whether or not scrolling will take place in response to the mouse wheel.
protected  String sample code for java.lang.String definition code for java.lang.String paramString sample code for javax.swing.JScrollPane.paramString() definition code for javax.swing.JScrollPane.paramString() ()
          Returns a string representation of this JScrollPane.
 void setColumnHeader sample code for javax.swing.JScrollPane.setColumnHeader(javax.swing.JViewport) definition code for javax.swing.JScrollPane.setColumnHeader(javax.swing.JViewport) (JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport  columnHeader)
          Removes the old columnHeader, if it exists.
 void setColumnHeaderView sample code for javax.swing.JScrollPane.setColumnHeaderView(java.awt.Component) definition code for javax.swing.JScrollPane.setColumnHeaderView(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  view)
          Creates a column-header viewport if necessary, sets its view, and then adds the column-header viewport to the scrollpane.
 void setComponentOrientation sample code for javax.swing.JScrollPane.setComponentOrientation(java.awt.ComponentOrientation) definition code for javax.swing.JScrollPane.setComponentOrientation(java.awt.ComponentOrientation) (ComponentOrientation sample code for java.awt.ComponentOrientation definition code for java.awt.ComponentOrientation  co)
          Sets the orientation for the vertical and horizontal scrollbars as determined by the ComponentOrientation argument.
 void setCorner sample code for javax.swing.JScrollPane.setCorner(java.lang.String, java.awt.Component) definition code for javax.swing.JScrollPane.setCorner(java.lang.String, java.awt.Component) (String sample code for java.lang.String definition code for java.lang.String  key, Component sample code for java.awt.Component definition code for java.awt.Component  corner)
          Adds a child that will appear in one of the scroll panes corners, if there's room.
 void setHorizontalScrollBar sample code for javax.swing.JScrollPane.setHorizontalScrollBar(javax.swing.JScrollBar) definition code for javax.swing.JScrollPane.setHorizontalScrollBar(javax.swing.JScrollBar) (JScrollBar sample code for javax.swing.JScrollBar definition code for javax.swing.JScrollBar  horizontalScrollBar)
          Adds the scrollbar that controls the viewport's horizontal view position to the scrollpane.
 void setHorizontalScrollBarPolicy sample code for javax.swing.JScrollPane.setHorizontalScrollBarPolicy(int) definition code for javax.swing.JScrollPane.setHorizontalScrollBarPolicy(int) (int policy)
          Determines when the horizontal scrollbar appears in the scrollpane.
 void setLayout sample code for javax.swing.JScrollPane.setLayout(java.awt.LayoutManager) definition code for javax.swing.JScrollPane.setLayout(java.awt.LayoutManager) (LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  layout)
          Sets the layout manager for this JScrollPane.
 void setRowHeader sample code for javax.swing.JScrollPane.setRowHeader(javax.swing.JViewport) definition code for javax.swing.JScrollPane.setRowHeader(javax.swing.JViewport) (JViewport sample code for javax.swing.JViewport definition code for javax.swing.JViewport  rowHeader)
          Removes the old rowHeader, if it exists.
 void setRowHeaderView