Sammy Kaye, 77, a bandleader who kept millions of Americans dancing for four decades to his "swing and sway" rhythms, died of cancer Tuesday at the Valley Hospital in Ridgewood, N.J.

Mr. Kaye wrote his band's theme song, "Until Tomorrow," and other numbers, including "Hawaiian Sunset" and "Tell Me You Love Me." "Swing and Sway with Sammy Kaye" was his trademark but he also was permanently identified with the "so-you-want-to-lead-a-band" programs in which he turned his baton over to eager amateur bandleaders.

One of the most popular of the big band leaders, the folksy Mr. Kaye toured the country, appeared on radio and television and in movies and set up four music publishing firms. His records were among Columbia's best sellers for many years.

In his latter days, Mr. Kaye played everything from rock 'n' roll to Lawrence Welk favorites, but he was best known for the smooth tunes in simple arrangements that dominated the swing era in the late 1930s and the 1940s.

Mr. Kaye was born March 13, 1910, in Lakewood, Ohio, to Czech parents. Excelling in high school track and basketball, he won an athletic scholarship to Ohio University, where he earned a degree in civil engineering and formed a band.

After graduation in 1933, Kaye toured with his band and in 1938 opened at New York's Commodore Hotel, on 42nd Street next to Grand Central Terminal.

"Man, what a time that was for bands," he reminisced years later. "Eddy Duchin was next door at the Biltmore, {Guy} Lombardo up the street at the Roosevelt, Benny Goodman was at the Paramount Theater and Glen Gray was up the Sound at the Glen Island Casino."

He could be biting but philosophical on the subject of rock music. "Naturally, I'm strictly aghast at some of the orgiastic musical delinquency that erupts in the spurious name of music," he once said. "But we've always had some manner of musical gangsters on the lunatic fringes of Tin Pan Alley, and these, too, shall pass."

His marriage to Ruth Knox Elden ended in divorce. He leaves no immediate survivors.