package main;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.AbstractButton;

class TableTitleListener implements ActionListener {
    StartApplet applet;
    
    public TableTitleListener(StartApplet applet) {
        this.applet = applet;
    }

    public void actionPerformed(ActionEvent e) {
        AbstractButton aButton = (AbstractButton) e.getSource();
        
        if ( aButton.getText().equals( "yes" ) ) {
            applet.title_value = "yes";
            applet.CSVTable();
        }
        else {
            applet.title_value = "no";
            applet.CSVTable();
        }
    }
}