JDK-4474094 : DefaultTableModel.addColumn should allow null
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2001-06-25
  • Updated: 2001-07-12
  • Resolved: 2001-07-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Description
DefaultTableModel.addColumn currently does not allow null for the name. As it is possible to set the column name to null via other methods (constructors, or directly manipulator field), addColumn should allow a null value for name.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2
2004-06-14

EVALUATION Yes, this should be done. This will result in changing the javadoc for addColumn to: /** * Adds a column to the model. The new column will have the * identifier <code>columnName</code>, which may be null. This method * will send a * <code>tableChanged</code> notification message to all the listeners. * This method is a cover for <code>addColumn(Object, Vector)</code> which * uses <code>null</code> as the data vector. * * @param columnName the identifier of the column being added */ public void addColumn(Object columnName); /** * Adds a column to the model. The new column will have the * identifier <code>columnName</code>, which may be null. * <code>columnData</code> is the * optional vector of data for the column. If it is <code>null</code> * the column is filled with <code>null</code> values. Otherwise, * the new data will be added to model starting with the first * element going to row 0, etc. This method will send a * <code>tableChanged</code> notification message to all the listeners. * * @param columnName the identifier of the column being added * @param columnData optional data of the column being added */ public void addColumn(Object columnName, Vector columnData); scott.violet@eng 2001-06-25 Phil actually did this before he left, I just filed the CCC request. scott.violet@eng 2001-07-12
2001-06-25