## Uses of Class
javax.swing.JScrollPane

- Packages that use JScrollPane
  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.
  javax.swing.plaf.basic | Provides user interface objects built according to the Basic look and feel.
  javax.swing.plaf.metal | Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel.
  javax.swing.plaf.synth | Synth is a skinnable look and feel in which all painting is delegated.

- - ### Uses of JScrollPane in javax.swing

    Methods in javax.swing that return JScrollPane
    Modifier and Type | Method | Description
    --- | --- | ---
    `static JScrollPane` | JTable.`createScrollPaneForTable(JTable aTable)` Deprecated. As of Swing version 1.0.2, replaced by `new JScrollPane(aTable)`.

    Methods in javax.swing with parameters of type JScrollPane
    Modifier and Type | Method | Description
    --- | --- | ---
    `Rectangle` | ScrollPaneLayout.`getViewportBorderBounds(JScrollPane scrollpane)` Deprecated. As of JDK version Swing1.1 replaced by `JScrollPane.getViewportBorderBounds()`.
    `void` | ScrollPaneLayout.`syncWithScrollPane(JScrollPane sp)` This method is invoked after the ScrollPaneLayout is set as the LayoutManager of a `JScrollPane`.

  - ### Uses of JScrollPane in javax.swing.plaf.basic

    Fields in javax.swing.plaf.basic declared as JScrollPane
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected JScrollPane` | BasicComboPopup.`scroller` This protected field is implementation specific.
    `protected JScrollPane` | BasicScrollPaneUI.`scrollpane`

    Methods in javax.swing.plaf.basic that return JScrollPane
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected JScrollPane` | BasicComboPopup.`createScroller()` Creates the scroll pane which houses the scrollable list.
    `protected JScrollPane` | BasicTreeUI.ComponentHandler.`getScrollPane()` Returns the JScrollPane housing the JTree, or null if one isn't found.

    Methods in javax.swing.plaf.basic with parameters of type JScrollPane
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | BasicScrollPaneUI.`installDefaults(JScrollPane scrollpane)`
    `protected void` | BasicScrollPaneUI.`installKeyboardActions(JScrollPane c)`
    `protected void` | BasicScrollPaneUI.`installListeners(JScrollPane c)`
    `protected void` | BasicScrollPaneUI.`uninstallDefaults(JScrollPane c)`
    `protected void` | BasicScrollPaneUI.`uninstallKeyboardActions(JScrollPane c)`

  - ### Uses of JScrollPane in javax.swing.plaf.metal

    Methods in javax.swing.plaf.metal with parameters of type JScrollPane
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | MetalScrollPaneUI.`installListeners(JScrollPane scrollPane)`
    `void` | MetalScrollPaneUI.`uninstallListeners(JScrollPane scrollPane)` Deprecated. - Replaced by `MetalScrollPaneUI.uninstallListeners(JComponent)`

  - ### Uses of JScrollPane in javax.swing.plaf.synth

    Methods in javax.swing.plaf.synth with parameters of type JScrollPane
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | SynthScrollPaneUI.`installDefaults(JScrollPane scrollpane)`
    `protected void` | SynthScrollPaneUI.`installListeners(JScrollPane c)`
    `protected void` | SynthScrollPaneUI.`uninstallDefaults(JScrollPane c)`

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, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.