DefaultListModel classpathEntryListModel = (DefaultListModel) classpathEntryList.getModel(); classpathEntryListModel.clear(); for (int i = 0; i < project.getNumAuxClasspathEntries(); ++i) { classpathEntryListModel.addElement(project.getAuxClasspathEntry(i)); }
    private void synchProject(Project project) {	// Clear text fields	jarNameTextField.setText("");	srcDirTextField.setText("");		// Populate jar and source dir lists	DefaultListModel jarListModel = (DefaultListModel) jarFileList.getModel();	jarListModel.clear();	for (int i = 0; i < project.getNumJarFiles(); ++i) {	    jarListModel.addElement(project.getJarFile(i));	}		DefaultListModel srcDirListModel = (DefaultListModel) sourceDirList.getModel();	srcDirListModel.clear();	for (int i = 0; i < project.getNumSourceDirs(); ++i) {	    srcDirListModel.addElement(project.getSourceDir(i));	}    }