When i add another JPanel into frame previous will dissapper (or probably overlaps the previous one). How can i stop this overlapping?
public Attack() {
    JFrame frame = new JFrame("Oracle Padding Attack");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    panel1.setLayout(null);
    JLabel label1 = new JLabel("Inicialization vector:");
    createTextField(10, 40, arrayIV, panel1, "HH", true, false);
    label1.setBounds(10, 0, 120, 50);
    panel1.add(label1);
    panel2.setLayout(null);
    JLabel label2 = new JLabel("Encrypted text:");
    createTextField(400, 40, encryptedTextArray, panel2, "00", true, false);
    label2.setBounds(400, 0, 120, 50);
    panel2.add(label2);
    frame.add(panel1);
    frame.add(panel2);
    frame.setSize(900, 400);
    frame.setVisible(true);
}
 
     
    