I want to update jlabel and jtextfield with setText() method but it is not working. However, rest of the code is working. The code is below;
btnDosyaSe.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
JFileChooser jfc = new JFileChooser();
jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int kullaniciSecimi = jfc.showOpenDialog(null);
if (kullaniciSecimi == JFileChooser.APPROVE_OPTION) {
File fileName = jfc.getSelectedFile();
textField.setText(fileName.getPath());
islemSureci.setText("Veriler Okunuyor...");
try {
ArrayList<ArrayList<String>> tumYazılar = rwd.readTXT(fileName.getPath());
String[] yazarlar = rwd.yazarlar(fileName.getPath());
islemSureci.setText("Veriler Okundu! Öznitelik çıkarımına başlandı...");
oznitelikler = oc.oznitelikleriBul(tumYazılar, yazarlar);
islemSureci.setText("Öznitelikler Çıkarılmıştır!");
//String text = readTXT(fileName);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
});
In here, islemSureci is JLabel and textFiled is JTextField. When they are set, it is not working. After all the work finish in the code, they appear. Please can you tell what is the reasons?