Курсовая работа: Программа "Система обучения"
}
else {
}
}
public void SetInList(String path, JComboBox j)
{
File F = new File(path);
String ArrOfFile[] = F.list();
for ( int k= 0;k<ArrOfFile.length;k++)
{
try {
Scanner in = new Scanner(new File(path + "\\" + ArrOfFile[k]));
StringBuffer data = new StringBuffer();
while (in.hasNext()) {
data.append(in.nextLine()).append("\n");
}
String s1 = data.toString();
if(!s1.equals("")){
int i = ArrOfFile[k].indexOf(".");
String L1 = ArrOfFile[k].substring(0, i);
j.addItem(L1);}
} catch (FileNotFoundException ex) {
Logger.getLogger(ShowResultForTeacher.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
public void SetResultInFile(String path, String info)
{
try {