The stye in the eyes is also called blepharitis, is the acute inflammation of glandula sebacea or tarsus. There's four reasons to the happening of stye. First, over fatigue of eyes, it lead to contract of muscle around the eyes socket, then the openning of gland congested. Two, the bacterials and virus get into the openning of glandula sebacea. Three, reduced from food allergy. Four, diabetes induce to the syptoms. As for the second reason, it may happen by the inflammation of virus from outside environment. However, there's no positive connection between the two things of swimming and stye. Please go to doctor for the detailed check and further treatment.