This applet demonstrates that particles can only exist at some fixed energy levels for a box of fixed width.
The Box here represents a one dimensional area beyond which the wave nature of the particle cannot be detected.
A particle here means a wave with nodes at the end of the walls.
The slider alongside E can be moved to fix energy levels, and the slider alongside W changes the width of the box.
Only a state for which the equilibrium line turns green can exist. Notice that the equilibrium line turns green only when there are nodes at both ends of the wall.
To see a slow transition from point A to point B along any slider, click and hold the mouse at point B.
This wonderful applet and many others like it can be found at: Dieter Bingemann's Chem 153 page