The Arrange Icons command arranges all the icons into a row starting from the lower left corner.
Menu:
Window | Arrange Icons