I want to replace a Jpanel with another one in a JFrame I already search and try my code but nothing\'s happen this is my code :
public class Frame extends
don't to use AbsoluteLayout
AbsoluteLayout
change validate(); in actionPerformed to contain.validate(); and follows with contain.repaint();
validate();
actionPerformed
contain.validate();
contain.repaint();
rename class name (reserved Java word, or methods name) Frame (java.awt.Frame) to MyFrame (for example)
Frame
java.awt.Frame
MyFrame
use CardLayout instead of remove and then add a new JPanel on runtime
CardLayout
JPanel