[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/17360] JScrollPane has incorrect size when JList with specifi
From: |
abalkiss at redhat dot com |
Subject: |
[Bug swing/17360] JScrollPane has incorrect size when JList with specified size is added to it |
Date: |
26 Oct 2005 17:00:26 -0000 |
------- Comment #5 from abalkiss at redhat dot com 2005-10-26 17:00 -------
An even more specific test case shows that the problem is in ScrollPaneLayout's
preferredLayoutSize method.
***TESTCASE***
import java.awt.*;
import javax.swing.*;
class Test
{
public static void main(String[] args)
{
String[] items =
{
"Item1", "Item2", "Item3", "Item4", "Item5", "Item6",
"Item7", "Item8", "Item9", "Item10", "Item11"
};
JList list = new JList(items);
list.setPreferredSize(new Dimension(150, 150));
JScrollPane scroller = new JScrollPane(list);
System.out.println (scroller.getLayout().preferredLayoutSize(scroller));
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17360