United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4474094 DefaultTableModel.addColumn should allow null
JDK-4474094 : DefaultTableModel.addColumn should allow null

Details
Type:
Enhancement
Submit Date:
2001-06-25
Status:
Resolved
Updated Date:
2001-07-12
Project Name:
JDK
Resolved Date:
2001-07-12
Component:
client-libs
OS:
solaris_7
Sub-Component:
javax.swing
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.0 (beta2)

Related Reports

Sub Tasks

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
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
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
merlin-beta2

FIXED IN:
merlin-beta2

INTEGRATED IN:
merlin-beta2


                                     
2004-06-14



Hardware and Software, Engineered to Work Together