Fields
| Name | Description |
|---|---|
| SCROLLBARS_ALWAYS | Specifies that horizontal/vertical scrollbars should always be shown regardless of the respective sizes of the scrollpane and child. |
| SCROLLBARS_AS_NEEDED | Specifies that horizontal/vertical scrollbar should be shown only when the size of the child exceeds the size of the scrollpane in the horizontal/vertical dimension. |
| SCROLLBARS_NEVER | Specifies that horizontal/vertical scrollbars should never be shown regardless of the respective sizes of the scrollpane and child. |
Constructors
| Name | Description |
|---|---|
| ScrollPane() | Create a new scrollpane container with a scrollbar display policy of "as needed". |
| ScrollPane(int) | Create a new scrollpane container. |
Methods
| Name | Description |
|---|---|
| addImpl(Component, Object, int) | Adds the specified component to this scroll pane container. |
| addNotify() | Creates the scroll pane's peer. |
| doLayout() | Lays out this container by resizing its child to its preferred size. |
| getHAdjustable() | Returns the Adjustable object which represents the state of the horizontal scrollbar. |
| getHScrollbarHeight() | Returns the height that would be occupied by a horizontal scrollbar, which is independent of whether it is currently displayed by the scroll pane or not. |
| getScrollbarDisplayPolicy() | Returns the display policy for the scrollbars. |
| getScrollPosition() | Returns the current x,y position within the child which is displayed at the 0,0 location of the scrolled panel's view port. |
| getVAdjustable() | Returns the Adjustable object which represents the state of the vertical scrollbar. |
| getViewportSize() | Returns the current size of the scroll pane's view port. |
| getVScrollbarWidth() | Returns the width that would be occupied by a vertical scrollbar, which is independent of whether it is currently displayed by the scroll pane or not. |
| layout() | Deprecated. |
| paramString() | Returns the parameter string representing the state of this container. |
| printComponents(Graphics) | Prints the component in this scroll pane. |
| setLayout(LayoutManager) | Sets the layout manager for this container. |
| setScrollPosition(int, int) | Scrolls to the specified position within the child component. |
| setScrollPosition(Point) | Scrolls to the specified position within the child component. |