problem switching JPanels in a contentPane center position
I have problems changing the JPanel at the center position of my frame's contentpane, what I do is I create a new JPanel instance with new properties(actually a subclass of JFrame) assign it to the contentPane center position but it does not display. all this is done in a event handler, this is to state between the states of the application can anyone help me out
publicvoid actionPerformed(ActionEvent ae){
if(ae.getSource()==transaction){
JPanel newpanel=new JPanel();
//even tried this.getContentPane().remove(oldPanel) still no good
this.getContentPane().add("Center",newPanel);// I was thinking it will do
}
}

