• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to change the size of scrollbar

 
rose deng
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
How to change the size of scrollbar in scrollpane in AWT?
million thanks in advance.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rose,
What do you mean by "set the size"? Do you mean the way that the scrollbar looks? As the scrollpane gets taller/wider, the scrollbar gets longer in that direction... do you mean that you want the vertical scrollbar to appear wider/the horizontal scrollbar to appear taller? Or are you talking about wanting to set the min/max/increment values on the scrollbar? More info would be helpful...
-Nate
 
Joe McGuire
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you can.
From the ScrollPane class API:
"Certain adjustable properties (minimum, maximum, blockIncrement, and visibleAmount) are set internally by
the scrollpane in accordance with the geometry of the scrollpane and its child and these should not be set by
programs using the scrollpane."
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!