Yes
After its defeat by the Ottoman Turks in the battle of Mohács in 1525, Hungary was split in three parts. Transylvania became an independent Kingdom, albeit under both Ottoman and Habsburg influence.
King John Sigismund (son of Szapolyai János and Izabella) was the first Transylvanian king and was also elected and crowned King of Hungary.