Dear Readers, I have added a JList to a JPanel with the help of a JScrollBar. But, when the list is either empty or too small, the vertical scrollbars dont appear. How do I make sure that they are visible everytime?
If you use a JScrollPane, then you can set the scrollbar policies using constants, VERTICAL_SCROLLBAR_ALWAYS and HORIZONTAL_SCROLLBAR_ALWAYS. (The defaults are "...AS_NEEDED.")
Moving this topic to the Swing forum.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
It's a pleasure to see superheros taking such an interest in science. And this tiny ad: