answer: A platted town was established there in 1822, a year after the United States gained Florida from Spain ; it was named after Andrew Jackson , the first military governor of the Florida Territory and seventh President of the United States .