How to dynamically update the content of the interface by clicking the button in JAVA SWING, such as the "Next" function in the software, will lead to different interfaces.

Landlord, you can look at my answer:

According to the button event trigger, delete the controls in the original interface, add the controls again, add the panel again, and then immediately call the resize () method to reconstruct the window, so that the changes in the window layout can be displayed immediately, which can completely meet the requirements of the landlord.

Simple, what to replace containers, replace controls, etc., is essentially my method:

As for resetting the layout manager, you will find that it doesn't work if you actually try it.

/question/3 1 1353304 . html