So basically I have an array saved in class, I then have a separate class which brings up a form. I wish to use this form to search within the array, i later want to work with the array to edit it.

class to hold array
    public class EventData {    
 
                             public static void main(String[] args) {
 
                                 String[] Event = new String[2];
                                 Event[0] = new String("01-01-2013", "closed");
                                 Event[1] = new String("02-01-2013", "closed");;
                                                                  }
                                    }

class to hold form
*
  public class Picker {
        public static void main(String[] args ) {
             final JTextField t = new JTextField(0);  
             final JTextField t1 = new JTextField(40);
             JButton b = new JButton("Open Calendar");
             JLabel l1 = new JLabel("Event");
             JPanel p = new JPanel();
             p.add(b);
             p.add(l1);
             p.add(t1);
             final JFrame f = new JFrame();
             f.getContentPane().add(p);
             f.pack();
             f.setVisible(true);
 
             b.addActionListener(new ActionListener() {
                          public void actionPerformed(ActionEvent ae) {
                                 //*If the array is set here the code works fine, 
                                // outside of the actionListener and it doesn't work*   
                                /*
                                String[] Event;
                                Event = new String[2];
                                Event[0] = "";
                                Event[1] = "01-01-2013 -- Closed";
                                 /*
                                t.setText(new DatePicker(f).setPickedDate());
                                String input = t.getText();
 
                                 for(String ent: Event) {
                                      if(ent.startsWith(input)){
                                             t1.setText("" + ent);
                                                                       }
                                       else {
                                              t1.setText ("No Event");
                                              }
                                                                       }
 
 
                                                               }
                                                                                     }
                                                                        );
 
                               }
}
any suggestions, I have tried placing the array in a method and calling it using EventData.Ent however this didn't work either