I am redirecting System.out.print()
to a JTextArea
inside of a JScrollPane
. This works fine except for one case as follows in this snippet:
public void vcFile(){
System.out.println("In vcFile"); // THIS WORKS!
File[] files = getChooser("Select File(s)", JFileChooser.FILES_AND_DIRECTORIES, true);
if(files[0] != null) {
...
try {
for(int j=0; j<files.length; j++) {
// SDencryptFiles() has System.out.println()'s in it, but
// no System.out's show in the JScrollPane until after
// SDencryptFiles completes I want then to appear as they
// are executed
SDencryptFiles(String, String, int);
}
} catch (Exception e) {
}
}
...
Do I need to run something in the background on a separate Thread? Any ideas are appreciated.
Thanks.