The moose likes Swing / AWT / SWT and the fly likes JList (Scrollable?) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JList (Scrollable?)" Watch "JList (Scrollable?)" New topic

JList (Scrollable?)

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I'm trying to create an application in Swing with a scrollable JList, I know in AWT it is merely a boolean setting. I can't find a way to set it in Swing.... Help
Glen Tanner
Ranch Hand

Joined: Apr 16, 1999
Posts: 147

JList doesn't support scrolling directly. To create a scrolling list you make the JList the viewport view of a JScrollPane.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Great thanks alot Glenn
It is sorta covered in the JavaRanch Style Guide.
subject: JList (Scrollable?)
Similar Threads
update a JList based on an Array
How to add a String array to JList?
How to listen multiple JList?
Need ScrollPane with just VERTICAL Scrolling facility
JList question