From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12002 invoked by alias); 26 Oct 2005 17:00:27 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 11983 invoked by uid 48); 26 Oct 2005 17:00:27 -0000 Date: Wed, 26 Oct 2005 17:00:00 -0000 Message-ID: <20051026170027.11982.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug swing/17360] JScrollPane has incorrect size when JList with specified size is added to it In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "abalkiss at redhat dot com" X-SW-Source: 2005-q4/txt/msg00219.txt.bz2 List-Id: ------- 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