I committed this patch to fix setAutoCreateColumnsFromModel() to match
the API spec more closely:
2005-07-06 David Gilbert <[EMAIL PROTECTED]>
* javax/swing/JTable.java
(setAutoCreateColumnsFromModel): when the flag changes from false to
true, call createDefaultColumnsFromModel().
Regards,
Dave Gilbert
Index: javax/swing/JTable.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JTable.java,v
retrieving revision 1.32
diff -u -r1.32 JTable.java
--- javax/swing/JTable.java 5 Jul 2005 20:17:14 -0000 1.32
+++ javax/swing/JTable.java 6 Jul 2005 07:57:45 -0000
@@ -1421,13 +1421,20 @@
}
/**
- * Set the value of the [EMAIL PROTECTED] #autoCreateColumnsFromModel}
property.
+ * Set the value of the [EMAIL PROTECTED] #autoCreateColumnsFromModel} flag.
If the
+ * flag changes from <code>false</code> to <code>true</code>, the
+ * [EMAIL PROTECTED] #createDefaultColumnsFromModel()} method is called.
*
- * @param a The new value of the autoCreateColumnsFromModel property
+ * @param autoCreate the new value of the flag.
*/
- public void setAutoCreateColumnsFromModel(boolean a)
+ public void setAutoCreateColumnsFromModel(boolean autoCreate)
{
- autoCreateColumnsFromModel = a;
+ if (autoCreateColumnsFromModel != autoCreate)
+ {
+ autoCreateColumnsFromModel = autoCreate;
+ if (autoCreate)
+ createDefaultColumnsFromModel();
+ }
}
/**
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches