Курсовая работа: Программа "Система обучения"

f1 = new File(path);

PrintWriter writer = null;

writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(path)));

writer.write(info);

writer.close();

} catch (FileNotFoundException ex) {

Logger.getLogger(ShowResultForTeacher.class.getName()).log(Level.SEVERE, null, ex);

}

}

public void ShowResultForEach(String path,JTextField t1,JTextField t2,JTextField t3,JTextField t4,JTextField t5,JTextField t6,JComboBox j)

{

String s = (String) j.getSelectedItem()+".txt";

File F = new File(path);

String ArrOfFile[] = F.list();

System.out.println(ArrOfFile.length);

boolean b;

for( int k =0;k<ArrOfFile.length;k++)

{

if(s.equals(ArrOfFile[k]))

{

try {

b=false;

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();

System.out.println(b);

int i = s1.indexOf("#");

К-во Просмотров: 581
Бесплатно скачать Курсовая работа: Программа "Система обучения"