i think you have to make your sub classes inner classes, like that they can talk directly with your principal classe, and change attributes with each other.
so try this and see:
alculateB.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
{
double amount, years, interst, certificate;
amount = Double.parseDouble(amountTF.getText());
years = Double.parseDouble(yearsTF.getText());
interest = Double.parseDouble(interestTF.getText());
certificate = amount * Math.pow(1 + rate/100, years);
certificateTF.setText("" + certificate);
}
});
exitB.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
{
System.exit(0);
}
});
let us know if it's working ;)