A button click produces an inversion with these graphics.
Rearranging buttons into rows or columns is easy - as the next demo shows. Just change the applet height and width, and the rest is automatic.