• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

what's possible reason for this?

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I add a scrollbar to a panel,but scrollbar knob dissapear,and arrow is grey.
How to solve this ?
Thank you.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Got some code to show us???
 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you have not set the scrollbar max above zero, or else it might that the scrollbar is not enabled. Try
scrollBar.setEnabled(true);
If you are using a JScrollPane instead of a JScrollBar, It may be that you have set the scrollbars to always display, and whatever you have inside the scrollpane is not big enough to need a scrollbar. You can set the scrollbar settings for a JScrollPane by using
setHorizontalScrollBarPolicy(int policy)
where policy is one of:
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS
JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
same thing for the verticalScrollBar
Good Luck!
 
reply
    Bookmark Topic Watch Topic
  • New Topic