project.addJar(jarFile); DefaultListModel listModel = (DefaultListModel)  jarFileList.getModel(); listModel.addElement(jarFile); jarNameTextField.setText("");
if (project.addJar(jarFile)) { DefaultListModel listModel = (DefaultListModel)  jarFileList.getModel(); listModel.addElement(jarFile); jarNameTextField.setText(""); }
    private void addJarToList() {	String jarFile = jarNameTextField.getText();	if (!jarFile.equals("")) {	    Project project = getCurrentProject();	    project.addJar(jarFile);	    DefaultListModel listModel = (DefaultListModel)  jarFileList.getModel();	    listModel.addElement(jarFile);	    jarNameTextField.setText("");	}    }