/[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.57 by abalkiss, Tue Nov 1 16:41:25 2005 UTC revision 1.58 by abalkiss, Tue Nov 1 20:16:46 2005 UTC
# Line 1081  public class JTable Line 1081  public class JTable
1081        {        {
1082          setColumnModel(createDefaultColumnModel());          setColumnModel(createDefaultColumnModel());
1083          autoCreate = true;          autoCreate = true;
1084        }            }        
     updateUI();  
1085      setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);      setSelectionModel(sm == null ? createDefaultSelectionModel() : sm);
1086      setModel(dm == null ? createDefaultDataModel() : dm);      setModel(dm == null ? createDefaultDataModel() : dm);
1087      setAutoCreateColumnsFromModel(autoCreate);      setAutoCreateColumnsFromModel(autoCreate);
1088      initializeLocalVars();      initializeLocalVars();
1089        // The following four lines properly set the lead selection indices.
1090        // After this, the UI will handle the lead selection indices.
1091        // FIXME: this should probably not be necessary, if the UI is installed
1092        // before the TableModel is set then the UI will handle things on its
1093        // own, but certain variables need to be set before the UI can be installed
1094        // so we must get the correct order for all the method calls in this
1095        // constructor.
1096        selectionModel.setAnchorSelectionIndex(0);    
1097        selectionModel.setLeadSelectionIndex(0);
1098        columnModel.getSelectionModel().setAnchorSelectionIndex(0);
1099        columnModel.getSelectionModel().setLeadSelectionIndex(0);
1100        updateUI();
1101    }        }    
1102    
1103    protected void initializeLocalVars()    protected void initializeLocalVars()

Legend:
Removed from v.1.57  
changed lines
  Added in v.1.58

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