[11:6] static
extends: object
Enum representing scroll bar policies for a ScrollPane.
The SpPolicy options include: ALWAYS
, which always shows the scrollbar;
AS_NEEDED
, which displays the scrollbar only when necessary; and NEVER
,
which hides the scrollbar at all times.
[21:7] extends: Node, Control, Region
Represents a JavaFX ScrollPane, a control that provides a scrollable view for its content. The ScrollPane class supports setting horizontal and vertical scrollbar policies.
ScrollPane ()
Initializes a new ScrollPane instance.
this
objectsetContent (Val
)
Sets the content to be displayed within the ScrollPane.
Val
The Node object to set as the content.void
setHBarPolicy (Policy
)
Sets the horizontal scroll bar policy for the ScrollPane.
Policy
The scroll bar policy, using values from SpPolicy (e.g., SpPolicy.ALWAYS).this
object for chainingsetVBarPolicy (Policy
)
Sets the vertical scroll bar policy for the ScrollPane.
Policy
The scroll bar policy, using values from SpPolicy (e.g., SpPolicy.AS_NEEDED).this
object for chaining