The new JList component does not appear because maybeUpdateLayoutState
does not update the layout state if the list.isValid() returns false.
I would suggest avoid applying patches, breaking some already existing
functionality. Even if such patches are correct by themselves, the
methods that have used the incorrect behavior should be fixed in the
same or immediately followed path.
2006-01-28 Audrius Meskauskas <[EMAIL PROTECTED]>
* javax/swing/plaf/basic/BasicListUI.java (maybeUpdateLayoutState):
Consider the validation state of
the list.
Audrius.
Index: BasicListUI.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/plaf/basic/BasicListUI.java,v
retrieving revision 1.52
diff -u -r1.52 BasicListUI.java
--- BasicListUI.java 28 Jan 2006 20:34:00 -0000 1.52
+++ BasicListUI.java 30 Jan 2006 08:19:12 -0000
@@ -899,7 +899,7 @@
*/
protected void maybeUpdateLayoutState()
{
- if (updateLayoutStateNeeded != 0)
+ if (updateLayoutStateNeeded != 0 || !list.isValid())
{
updateLayoutState();
updateLayoutStateNeeded = 0;