Preso da i doc:
C'è anche il costruttore che imposta direttamente il valore.codice:setHorizontalScrollBarPolicy public void setHorizontalScrollBarPolicy(int policy)Determines when the horizontal scrollbar appears in the scrollpane. The options are: ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS Parameters: policy - one of the three values listed above Throws: IllegalArgumentException - if policy is not one of the legal values shown above See Also: getHorizontalScrollBarPolicy()
Ovvimanete ci sono i metodi analoghi per quella verticale.
Se utilizzi il parametro HORIZONTAL_SCROLLBAR_NEVER non potrai vedere quanto va oltr il limte di visualizzazione.
Ciao

Rispondi quotando