/[classpath]/classpath/javax/swing/JTable.java
ViewVC logotype

Diff of /classpath/javax/swing/JTable.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.52 by abalkiss, Wed Oct 12 19:57:28 2005 UTC revision 1.53 by langel, Tue Oct 18 19:29:15 2005 UTC
# Line 671  public class JTable extends JComponent Line 671  public class JTable extends JComponent
671     */     */
672    public JTable (TableModel dm, TableColumnModel cm, ListSelectionModel sm)    public JTable (TableModel dm, TableColumnModel cm, ListSelectionModel sm)
673    {    {
674      setModel(dm == null ? createDefaultDataModel() : dm);      boolean autoCreate = false;
     setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);  
   
675      if (cm != null)      if (cm != null)
       {  
676          setColumnModel(cm);          setColumnModel(cm);
         setAutoCreateColumnsFromModel(false);  
       }  
677      else      else
678        {        {
679          setColumnModel(createDefaultColumnModel());          setColumnModel(createDefaultColumnModel());
680          setAutoCreateColumnsFromModel(true);          autoCreate = true;
681        }        }
682        setModel(dm == null ? createDefaultDataModel() : dm);
683        setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
684        setAutoCreateColumnsFromModel(autoCreate);
685      initializeLocalVars();      initializeLocalVars();
686      // The next two lines are for compliance with the JDK which starts      // The next two lines are for compliance with the JDK which starts
687      // the JLists associated with a JTable  with both lead selection      // the JLists associated with a JTable  with both lead selection

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26