Курсовая работа: Программа "Система обучения"
int t = s1.indexOf("%");
int u = s1.indexOf("&");
int h = s1.indexOf("\n");
String L1 = s1.substring(0, i);
String L2 = s1.substring((i+1), r);
String L3 = s1.substring((r+1), t);
String L4 = s1.substring((t+1), u);
String L5 = s1.substring(u+1,h );
t1.setText(L1);
t2.setText(L2);
t3.setText(L3);
t4.setText(L4);
t5.setText(L5);
}
}
catch (FileNotFoundException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
} } }}
public void ShowTime(String path , JTextField T, JComboBox j)
{
String s = (String) j.getSelectedItem()+".txt";
File F = new File(path);
String ArrOfFile[] = F.list();
for( int k =0;k<ArrOfFile.length;k++)
{
if(s.equals(ArrOfFile[k]))
{
try {
Scanner in = new Scanner(new File(path+"\\"+ArrOfFile[k]));