hi, i want to display the attack jpanel in the same frame when the button is clicked but instead it opens in a new frame

public void actionPerformed(ActionEvent e)
{
JFrame aFrame = new JFrame();
aFrame.setBounds(0,0,400,600);
Container contentPane = aFrame.getContentPane();
JButton s = (JButton)e.getSource();
if(s == attack)
{
contentPane.add(new Attack());
}
else if(s == defense)
{
contentPane.add(new Defense());
}
aFrame.setVisible(true);

}