Press Alt+F2 to bring up the Run Application dialog box, enter “gconf-editor” in the text field, and click on Run, The Configuration Editor should pop up.
Navigate to apps/metacity/general. In the right pane look for an entry for button layout and change it to menu:maximize,minimize,close and you are done.
Moving the window control button to right side becomes more easy if you got ubuntu tweak installed.
Go to Application > System Tools > Ubuntu Tweak and navigate to Desktop > Window Manager Settings section and change the Window Titlebar Button layout section to "Right" and save the settings