String jarFile = jarNameTextField.getText(); if (!jarFile.equals("")) { Project project = getCurrentProject(); project.addJar(jarFile); DefaultListModel listModel = (DefaultListModel)  jarFileList.getModel(); listModel.addElement(jarFile); jarNameTextField.setText(""); }
addJarToList();
    private void addJarButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addJarButtonActionPerformed	String jarFile = jarNameTextField.getText();	if (!jarFile.equals("")) {	    Project project = getCurrentProject();	    project.addJar(jarFile);	    DefaultListModel listModel = (DefaultListModel)  jarFileList.getModel();	    listModel.addElement(jarFile);	    jarNameTextField.setText("");	}    }//GEN-LAST:event_addJarButtonActionPerformed