title: performing ActionListener within the JPanel
body: <p>Here, i wanted to perform an action when a button is pressed, it is quite easy but the main problem is that to be performed within an extended JPanel. 
                  There might be an easy solution like add action listener to that particular button and invoke actionperformed event but my case is not like that, i have 4 buttons(t1,t2,t3,t4) all these buttons are to be functioned within a single ActionPerfomed event ae (look the segment of code). And later you can see the code that calls another JButtons tr and rf calling the actionlistener and actionperformed events. </p>
  
  <p>for clear understandability you can have a glance at the code...</p>
  
  <pre><code> class Tracker extends JPanel
  {
  
  public static void main(String[] args) {
      new Tracker();    }
  
  public Tracker()
  {
  
  JButton tr=new JButton("TRACKER APPLET");
  tr.setBounds(720,170,100,20);
  
  JButton rf=new JButton("REFRESH");
  rf.setBounds(200,170,100,20);
  
  boolean tc1=false,tc2=false,tc3=false,tc4=false;
  
  JButton t1=new JButton(" ");
  t1.addActionListener(this);
  JButton t2=new JButton(" ");
  t2.addActionListener(this);
  JButton t3=new JButton(" ");
  t3.addActionListener(this);
  JButton t4=new JButton(" ");
  t4.addActionListener(this);
  
  
  public void actionPerformed(ActionEvent ae)
  {
      if(ae.getSource()==t1)
      {
              tc1=true;
      }
      if(ae.getSource()==t2)
      {
              tc2=true;
      }
      if(ae.getSource()==t3)
      {
              tc3=true;
      }
      if(ae.getSource()==t4)
      {
              tc4=true;
      }
  
  }
  
  
  tr.addActionListener(new ActionListener(){
   public void actionPerformed(ActionEvent e){
  
      EventQueue.invokeLater(new Runnable() {
          @Override
          public void run() {
              try {
                  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              } catch (ClassNotFoundException ex){}
              catch(InstantiationException ex){}
              catch(IllegalAccessException ex){}
              catch(UnsupportedLookAndFeelException ex) {}
  
                  //some food here....
  
  
                             }
                          });
              }
               });        
  
      rf.addActionListener(new ActionListener(){
   public void actionPerformed(ActionEvent e){
  
      EventQueue.invokeLater(new Runnable() {
          @Override
          public void run()
          {
              try {
                  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                  } 
              catch (ClassNotFoundException ex){}
              catch(InstantiationException ex){}
              catch(IllegalAccessException ex){}
              catch(UnsupportedLookAndFeelException ex) {}
                           //some extra work runs here...
          }
      });
   }
      });
  add(tr);
  add(rf);
  add(t1);
  add(t2);
  add(t3);
  add(t4);
  }
  </code></pre>
  
  <p>My problem here is i couldn't implement ActionListener as the main class already extending JPanel. 
         I'm just trying to get work with Jbuttons :: wanted to perfom a single action when the buttons(t1|t2|t3|t4) and the JButtons(tr|rf) are pressed in a chronological order.. </p>
  
  <p>thanks in advance..</p>