retorna um valor quando um evento actionbacked de JButton é chamado

Eu tenho algum problema comJButton eventos de ação, eu declarei uma variável global (boolean tc1) e umJButton t1. Quando eu pressiono o JButton, preciso alterar o valor da variável booleana para 'true'. Alguém pode me ajudar? Meu código vai aqui.

class Tracker extends JPanel {
    public static void main(String[] args) {
        new Tracker();    
   }

    public Tracker() {

        JButton tr=new JButton("TRACKER APPLET");
        JButton rf=new JButton("REFRESH");

        boolean tc1=false,tc2=false,tc3=false,tc4=false;
        JButton t1=new JButton(" ");

        t1.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e){
                tc1=true;
            }
        });
        System.out.println(tc1);
        //remaining part of the code...
        // here i need to use the value of tc1 for further process..


    }
}

Obrigado.

questionAnswers(4)

yourAnswerToTheQuestion