I ran into this during in my old days of UI development using Java Swing. I eventually came across MiG Layout (http://www.migcalendar.com/miglayout/cheatsheet.html) which had a steep learning curve, but was extremely powerful.
In particular, you could give components a tag attribute, and it'd do platform-specific component reordering based on the tags. It was pretty sweet!