Jamaica gained full independence when it withdrew from the Federation in 1962 .