i want to read a data from a textfield save it on an array in the first class and
in the second class i wanted to display this data in a textfield,but my program returns nothing

here the first class 

```
import java.util.ArrayList;
public class Patient extends javax.swing.JFrame {
int emg;
String clas;
String day;
int sex;
String name;
String cls;
int count;
boolean[] Assignbed = new boolean[31];
ArrayList<Integer> list1;
ArrayList list2=new ArrayList();
ArrayList list3;
    /**
     *
     */
    public Patient() {
        this.list3 = new ArrayList<Integer>();
        this.list1 = new ArrayList<Integer>();
        initComponents();
    }
    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {                                           
    AWellcome a=new AWellcome();
    a.setVisible(true);
    dispose();
    }                                          

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Name();
    }                                                                               

    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Level();
    }                                                                                                                                                                   

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    occupation();
    }                                        

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Sex();
    }                                                                                                                      

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Age();
    }                                        

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Payment();
    }                                        

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Reserve();
    }                                        

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Date();
    }                                                                                                                                                                

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Department();
    }                                        
public ArrayList<Integer> getList() {
       return list1;
   }
public void Department(){
if(jComboBox3.getSelectedIndex()==0){
emg=Integer.parseInt(jTextField20.getText());
list1.add(emg);
}
else if(jComboBox3.getSelectedIndex()==1){
list2.add(jTextField20.getText());
}
else if(jComboBox3.getSelectedIndex()==2){
list3.add(jTextField20.getText());
}
}
public void Date(){
day=jTextField23.getText();
jTextField7.setText(day);
}
public void occupation(){
cls=jTextField44.getText();
jTextField15.setText(cls);
}
public void count(){
jTextField20.setText(Integer.toString(count));
}
public void fulllevel1(){
jTextField25.setText("level1_Full");
}
public void fulllevel2(){
jTextField25.setText("level2_Full");
}
public void fulllevel3(){
jTextField25.setText("Level3_Full");
}
public void Level(){
if(jComboBox2.getSelectedIndex()==0){
jTextField9.setText("Level 1");
}
else if(jComboBox2.getSelectedIndex()==1){
jTextField9.setText("Level 2");
}
else if(jComboBox2.getSelectedIndex()==2){
jTextField9.setText("Level 3");
}
}
public void Age(){
clas=jTextField43.getText();
jTextField13.setText(clas);
}
public void Sex(){
if(jComboBox1.getSelectedIndex()==0){
jTextField17.setText("Male");
}else if(jComboBox1.getSelectedIndex()==1)
{
jTextField17.setText("Female");
}
}
public void Name(){
name=jTextField42.getText();
jTextField11.setText(name);   
}
public void Payment(){
if(jComboBox2.getSelectedIndex()==0){
jTextField19.setText("50 Birr/Day");
}
else if(jComboBox2.getSelectedIndex()==1){
jTextField19.setText("30 Birr/Day");
}
else if(jComboBox2.getSelectedIndex()==2){
jTextField19.setText("20 Birr/Day");
}
}
public void Reserve()
    {
        if ( jComboBox2.getSelectedIndex() == 0 )
        {
            firstlevel();
        }
        else if(jComboBox2.getSelectedIndex()== 1)
        {
            secondlevel();
        }
         else if(jComboBox2.getSelectedIndex()== 2)
        {
            thirdlevel();
        }
    }

 public void firstlevel() // 
    {
        for ( count = 1; count <= 10; count++ )
        {
            if ( Assignbed[count] == false )  // if false, then a bed available for assignment
            {
                Assignbed[count] = true;  // assign bed
                count();
                break;
            }
            else if ( Assignbed[10] == true ) // If assignedbed[10] is true then first level is full
            {
                fulllevel1();

            }
        }
    }   

 public void secondlevel() //
    {
        for ( count = 11; count <= 20; count++ )
        {
            if ( Assignbed[count] == false ) //
            {
                Assignbed[count] = true; //
               count();
                break;
            }
            else if ( Assignbed[20] == true ) // 
            {
                fulllevel2();

            }
        }
    }
  public void thirdlevel() // 
    {
        for ( count = 21; count <= 30; count++ )
        {
            if ( Assignbed[count] == false ) 
            {
               Assignbed[count] = true;
               count();
                break;
            }
            else if ( Assignbed[30] == true ) 
            {
                fulllevel3();

            }
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Patient().setVisible(true);
            }
        });
    }

} 

```

Second class

```
import java.util.ArrayList;
public class Staff extends javax.swing.JFrame {
private Patient p;
    public Staff() {
        initComponents();
    }                      

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
    Department1();
    }                                        
    public ArrayList<Integer> Department1(){
    p=new Patient();
    ArrayList<Integer> list1 = p.getList();  
        return list1;
    } 
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Staff().setVisible(true);
            }
        });
    }

}

```