I\'m trying to create a small GUI, it has 2 JButtons, and 2 JPanels with some drawing animation on each of them. By default it must show first JPanel, and by clicking on sec
I think you can just use CardLayout to implement your function. Please refer to here
CardLayout