aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Problem with scrollbars in JList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with scrollbars in JList" Watch "Problem with scrollbars in JList" New topic
Author

Problem with scrollbars in JList

Mikko Poutanen
Greenhorn

Joined: May 29, 2002
Posts: 1
Hi!
I have a JTabbedPane which contains three JPanes. One of the JPanes contains another JPane and there's a JList. I created the JScrollPane for the list like this:

The vertical scrollbar should be always visible but it's not even if there's too much stuff in the list. None of the scrollbars are shown.
I also tried to set the viewport of the scrollpane manually but it didn't work either:

The layout of the JPane (which contains the JList and the JScrollPane) is set to null, I placed the components with setBounds() method. Selection model of the JList is set to ListSelectionModel.SINGLE_SELECTION.
Any suggestions?


------<br />Poutsi
keerthi matta
Greenhorn

Joined: May 31, 2002
Posts: 27
hi,
When the layout is null , u need to set the Bounds for ScrollPane , no need for List ,
can u post the whole code ,becoz the form in which u have initialised the ScrollPane is correct
keerthi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with scrollbars in JList