| Package | Description | 
|---|---|
| javax.swing | Provides a set of "lightweight"
(all-Java language) components that,
to the maximum degree possible, work the same on all platforms. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected JViewport | ScrollPaneLayout. colHeadThe column header child. | 
| protected JViewport | JScrollPane. columnHeaderThe column header child. | 
| protected JViewport | ScrollPaneLayout. rowHeadThe row header child. | 
| protected JViewport | JScrollPane. rowHeaderThe row header child. | 
| protected JViewport | ScrollPaneLayout. viewportThe scrollpane's viewport child. | 
| protected JViewport | JScrollPane. viewportThe scrollpane's viewport child. | 
| protected JViewport | JScrollPane.AccessibleJScrollPane. viewPort | 
| Modifier and Type | Method and Description | 
|---|---|
| protected JViewport | JScrollPane. createViewport()Returns a new  JViewportby default. | 
| JViewport | ScrollPaneLayout. getColumnHeader()Returns the  JViewportobject that is the column header. | 
| JViewport | JScrollPane. getColumnHeader()Returns the column header. | 
| JViewport | ScrollPaneLayout. getRowHeader()Returns the  JViewportobject that is the row header. | 
| JViewport | JScrollPane. getRowHeader()Returns the row header. | 
| JViewport | ScrollPaneLayout. getViewport()Returns the  JViewportobject that displays the
 scrollable contents. | 
| JViewport | JScrollPane. getViewport()Returns the current  JViewport. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Component | SwingUtilities. getUnwrappedView(JViewport viewport)Returns the first  JViewport's descendant
 which is not an instance ofJLayer. | 
| void | JScrollPane. setColumnHeader(JViewport columnHeader)Removes the old columnHeader, if it exists; if the new columnHeader
 isn't  null, syncs the x coordinate of its viewPosition
 with the viewport (if there is one) and then adds it to the scroll pane. | 
| void | JScrollPane. setRowHeader(JViewport rowHeader)Removes the old rowHeader, if it exists; if the new rowHeader
 isn't  null, syncs the y coordinate of its
 viewPosition with
 the viewport (if there is one) and then adds it to the scroll pane. | 
| void | JScrollPane. setViewport(JViewport viewport)Removes the old viewport (if there is one); forces the
 viewPosition of the new viewport to be in the +x,+y quadrant;
 syncs up the row and column headers (if there are any) with the
 new viewport; and finally syncs the scrollbars and
 headers with the new viewport. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.