Hy.
After um weak searching for this answer in a way I (java newbe) could undestand, I dedided to ask. My program consists in a Form JFrame with a buttom that starts a routine.
- JChooser to get a folder
- A list to get all files in that folder
start a for (loop) 3. A Process to unzip each of the files (.tgz). The unfolded tgz reveal a .tar 4. A Processo to unfold the tar. 5. Another Process to get the .csv file from the .tar and make some changes. ends the for
All this is inside a (private void btPegaDirActionPerformed(java.awt.event.ActionEvent evt)). But I have a textarea (name is txtDisplay) and it is only updated after the hole process. Ok, I know that Swing must have a outter process to update in real time all the time a Process is ended (i.e. unpiz #1, unzip #2, change CSV), and I don't know how to create the outter Process.
Here is the code.
private void btPegaDirActionPerformed(java.awt.event.ActionEvent evt) {
JCHooser....
Get file to array (between 28 to 32 files)
for (File arqTGZ : files) {
try {
unzip tgz (unfolds a tar)
System.out.println("Unzip OK")
(must updata java textarea here)
unzip tar (unfolds a csv)
System.out.println("Unzip OK")
(must updata java textarea here)
change CSV
System.out.println("CSV Saved")
(must updata java textarea here)
}
}
}
That is it. Could anybody help me, please?