title: Is there any possibilities to store JPanel object in arraylist
body: <p>Hi i got an assignment from my team leader that to store the employee details what the user entered in the textfield whatever in that panel, after that in the other frame the admin have to check the details of each employee by calling the arraylist, that list should show the panel in cardlayout,, here my coding for employee registration.can anyone please help me </p>
  
  <pre><code>Registration()
  {
      frm=new JFrame("Welcome to the login page");
      left=new JPanel(new GridLayout(0,1));
      left.setBackground(Color.LIGHT_GRAY);
      right=new JPanel(new GridLayout(0,1));
      right.setBackground(Color.LIGHT_GRAY);
      sp=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,left,right);
      lb9=new JLabel("Member");
      lb9.setFont(new Font("Serif",Font.PLAIN, 18));
      lb9.setForeground (Color.blue);
      lb10=new JLabel("Create an Account");
      lb10.setFont(new Font("Serif", Font.PLAIN, 16));
      lb10.setForeground (Color.blue);
      lb1=new JLabel("Username");
      tf1=new JTextField(10);
      lb2=new JLabel("Password");
      tf6=new JTextField(10);
      lb3=new JLabel("First Name");
      tf2=new JTextField(10);
      lb4=new JLabel("Last Name");
      tf3=new JTextField (10);
      lb5=new JLabel("Password");
      psd2=new JPasswordField (10);
      lb6=new JLabel("Confirm password");
      psd3=new JPasswordField (10);
      lb7=new JLabel("MailID:");
      tf4=new JTextField (10);
      lb8=new JLabel("Contact No");
      tf5=new JTextField (10);
      b1=new JButton("Enter");
      b2=new JButton("Register");
  
  }
  public void launchFrame()
  {
  
  
  frm.setSize(450, 350);
  frm.add(sp);
  //sp.setLeftComponent(left);
  //sp.setRightComponent(right);
  left.add(lb9);
  left.add(lb1);
  left.add(tf1);
  left.add(lb2);
  left.add(tf6);
  left.add(b1);
  
  
  right.add(lb10);
  right.add(lb3);
  right.add(tf2);
  right.add(lb4);
  right.add(tf3);
  right.add(lb5);
  right.add(psd2);
  psd2.setEchoChar('*');
  right.add(lb6);
  right.add(psd3);
  psd3.setEchoChar('*');
  right.add(lb7);
  right.add(tf4);
  right.add(lb8);
  right.add(tf5);
  right.add(b2);
  
  frm.setVisible(true);
  }
  </code></pre>