This is the supporting class...it needs to have a
String variable
Sting filename which it uses to do some analysis
public class analysis
{
FileReader rd;
FileWriter phy;
FileWriter gen;
BufferedReader brd;
JFileChooser fc;
File file;
String fileName="full1.txt";
public void methodAnalysis()
{
try
{
rd=new FileReader(fileName);
brd = new BufferedReader(rd);
phy =new FileWriter("physical.txt");
gen =new FileWriter("genetic.txt");
}
catch(FileNotFoundException e3)
{
System.out.println(e3.toString());
//System.exit(0);
}
catch(IOException e4)
{
System.out.println(e4.toString());
//System.exit(0);
}
.....................................................
}
This class has the main and the gui....it accepts the file name through
Jfilechooser and then has to call the above analysis class to generate 2 files....and then again calls its method to work on those 2 files...
public void actionPerformed(ActionEvent e)
{
// Analysis of the loaded file and display output
if(e.getSource()== headerB1)
{
anaD = new analysis();
// this belongs to the class analysis
anaD.methodAnalysis();
// this belongs to this class
methodWrite();
}