Hi, Java Eclipse windows
I have a calling class and a class that converts a file. I want to call the file converting class and do a conversion. While thats happening I want to print a number indicating progress in the jTextArea of the calling class...so
I get nothing, probably since you have to exit the while loop to print a message. Would there be a solution to this problem so I can get a counting txtArea while in InnerObject?Code:class Object 1 { public void actionPerformed(ActionEvent e) { InnerObject.doStuff(OuterFile, txtArea); } } public static File doStuff(File InnerFile, JTextArea InnerTextArea) { try { while (somecondition) { //Do converting stuff here convertstepcounter2=convertstepcounter; Integer.toString(convertstepcounter2); InnerTextArea.append(""+convertstepcounter2 + "\n"); InnerTextArea.setCaretPosition(InnerTextArea.getText().length()); convertstepcounter++; } } catch(IOException ie){ ie.printStackTrace(); } return convertedFile; }
Thanks




Reply With Quote