Could you give an example. I have a class that I import into my project. It looks something like this (truncated):
Code:
//This is the import list
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import utilities.File.FileHandler;
import New.Generic.MyClass;
//This is the code that initiates the function. This is called from
//the mouse click event on a radiobutton.
public void cmd_BreakMouseClicked(java.awt.event.MouseEvent e)
{
String str_Source;
String str_Dest;
boolean bool_continue=true;
txt_status.setText("Processing Files...Please wait.");
repaint();
str_Source=txt_Source.getText();
str_Dest=txt_Dest.getText();
if (str_Source.length()==0) {
txt_status.setText("Source File cannot be left blank...Stopping");
bool_continue=false;
}
if (str_Dest.length()==0 && bool_continue==true) {
txt_status.setText("Destination file cannot be left blank...Stopping");
bool_continue=false;
}
if (bool_continue==true) {
repaint();
int lng_count=MyClass.ParseFile(str_Source, str_Dest);
txt_status.setText(lng_count + " records have been broken.");
}
cmd_Break.setSelected(false);
}
Code:
//This is from the Generic Class file
package New.Generic;
import java.io.*;
import java.lang.*;
public class MyClass {
public static int ParseFile(String str_Source, String str_Dest){
//Truncated
}
}
So how would I thread this? Also, the loop that is causing me such grief is in the ParseFile Method.
Thanks for you help so far