While in New York, Mr. Swigert and Capt. James A. Lovell Jr., the commander of Apollo 13, attended a performance of the musical ''Hair.'' They walked out early because, Mr. Swigert said, ''I don't like what you're doing to the flag.''

In 1973, Mr. Swigert became the executive director of the House Committee on Science and Technology. He held the position until 1977, when he began campaigning for election to the Senate in 1978. He was defeated in the Republican primary by William L. Armstrong, a friend who was at Mr. Swigert's side when he died. He Served 2 Denver Companies

From 1977 until last April, Mr. Swigert served as a vice president for two Denver companies, the B.@D.@M. Corporation, a technical research company, and International Gold and Minerals.

Mr. Swigert was tall, husky and sported a crew cut most of his life. He was a lifelong bachelor, and some of the other astronauts, all of whom were married, joked that he was somewhat of a swinger. One of his sisters once said he had ''a girl in every airport from coast to coast.''

He used to say that he was not a confirmed bachelor but that it was just that he had just not met the right woman. As an astronaut, Mr. Swigert lived in apartment near the Manned Spacecraft Center in Houston, which he had outfitted with a beer spigot in the kitchen and an elaborate stereophonic sound system. In the living room, he had a reclining chair covered in thick gray fur. Father Was an Eye Doctor

John Leonard Swigert Jr. was born Aug. 30, 1931, in Denver, the son of an ophthalmologist who pressed his son to follow him into medicine.

''Jack just didn't want to be a doctor,'' his mother, Virginia, recalled. ''He was interested in mechanical things and would rather tinker with an old car than anything else.''