(Illustration by Jack Hughes /For The Washington Post)

Nearly a year before the 1960 presidential election, Sen. John F. Kennedy displayed a startling sense of prophesy about the influence of television in politics.

Writing in the Nov. 14, 1959, issue of TV Guide more than a month before he announced his candidacy, Kennedy seemed to foresee a crucial moment in the battle for the White House. As though visualizing Richard Nixon’s doomed visage — dark and sweaty — and his own youthful charm on national television during the presidential debates, the senator declared: “Many new political reputations have been made on TV — and many old ones have been broken.”

Once in the White House, Kennedy, who was born 100 years ago this month, embraced the mantle of America’s first television president, using the small screen to enhance his image and to communicate with the nation. As he told his speechwriter Ted Sorensen after watching a replay of his smooth performance at a news conference, “We couldn’t survive without TV.”

Just as Kennedy navigated his way to the White House in 1960 by looking good on the new medium of television, Donald J. Trump captured the Oval Office in 2016 in no small measure by his savvy exploitation of the newer medium of Twitter. “I think that maybe I wouldn’t be here if it wasn’t for Twitter,” Trump told Fox News’s Tucker Carlson in March. “I have my own form of media.”

While Kennedy and Trump mastered the megaphones of their eras, allowing them often to bypass the traditional media and speak directly to the electorate, neither television nor Twitter has freed politicians from the scrutiny of reporters. Print and broadcast journalism is no longer the mostly civil monolithic behemoth of Kennedy’s day. Today, politicians must reckon with a diffuse and more raucous media world to explain their policies, project their images and construct their legacies. How they interact with journalists goes a long way toward shaping their portraits in the first draft of history.

President John F. Kennedy at a 1961 news conference; while in office he averaged about one every 16 days. (Bettmann Archive/Getty Images)

While he had his scraps with the press, Kennedy was known for embracing reporters, amusing and even befriending them, a communion that was instrumental in fostering his lasting, and in some eyes romanticized, legacy. By his coolness, wit and willingness to hold regular news conferences, he beguiled many reporters. Although the Washington press corps is a combative fact-finding herd — as American democracy would have it — it comprises individuals susceptible to the charms of personality and presidential decency.

Trump’s tenure is still young and highly uncertain, but one thing is clear: His relationship with a large swath of the media is the most adversarial since the early 1970s, when President Richard Nixon insisted privately to his secretary of state, Henry Kissinger, “Never forget: The press is the enemy,” a sentiment Trump has echoed publicly on Twitter. Unlike Kennedy, Trump engages in direct battle with reporters. “He goes into his press encounters deployed for the war he says is ongoing, and he looks more like a warrior than a communicator,” says Frank Sesno, who spent 21 years at CNN — part of that time as White House correspondent.

Kennedy’s public geniality was on full display when he burst onto the national scene at the 1956 Democratic National Convention. He failed to win the vice presidential slot on the ticket of candidate Adlai Stevenson. But in losing, Kennedy wowed convention-goers and television viewers by making a good-natured podium appearance to call for unanimous support for his rival, Estes Kefauver. Four years later, when he took to the hustings in the presidential campaign, he captured the hearts of voters through the remarkable reach of television. Kennedy marveled at how the technology eased the task of informing the electorate. After World War I, for instance, President Woodrow Wilson — in the absence of mass communication — journeyed across the country for 22 days to rally support for the League of Nations, severely running down his health. Decades earlier, the impeachment of President Andrew Johnson in 1868 filled newspaper columns, but if you wanted to witness the proceedings in real time you had to finagle a much-coveted seat in the Senate galleries.

One of Kennedy’s most significant hurdles was his religion — no Catholic had ever occupied the Oval Office. To beat back suspicions, he took to television, buying airtime in Protestant West Virginia. “If his religion was what they held against him, Kennedy would discuss it,” Theodore White recounts in “The Making of the President 1960.”“There remains with me now a recollection of what I think is the finest TV broadcast I have ever heard any political candidate make.”

Kennedy wasted no time after entering the White House in conducting regular news conferences live on television. In his first week in office, he faced reporters in the State Department auditorium and took questions for 37 minutes as some 65 million Americans tuned in. He roamed over a range of subjects, from negotiations on a ban on atomic weapons testing to his rejection of renewed diplomatic relations with Cuba. In such a forum the president risked stumbling, appearing ill-informed, or mischaracterizing American policy and stirring worldwide repercussions. The new format itself came under scrutiny at the news conference as a reporter noted “there has been some apprehension about the instantaneous broadcast of presidential press conferences such as this one,” adding that “an inadvertent statement ... could possibly cause some grave consequences.” Kennedy was unfazed, pointing out that any factual error could be quickly clarified. His primary focus was on the medium’s effectiveness in getting across his message unfiltered to the American public.

“This system,” he said, “has the advantage of providing more direct communication.”

His television performances were a kind of tightrope act without a net and required considerable homework. Kennedy was able to forge an image of courage, accessibility and preparedness.

Embracing his era’s new medium, Trump has made effective use of Twitter both during the primaries and after winning the White House. Far more than any other modern politician, he understands the political power of compact Twitter declarations. On the campaign trail, Trump reduced his rivals to cartoon figures by machine-gunning disparaging tweets about them. Who can forget Crooked Hillary, Lyin’ Ted, Little Marco, Low Energy Jeb? And the criticisms stuck, allowing Trump to forge ahead of his Republican opponents and ultimately pull off an electoral college victory. Trump’s Twitter blasts demand little of him: When tweeting he is out of sight, not subject to the scrutiny of reporters or television cameras, and his messages are so brief as to be little more than headlines or announcements lacking elaboration. Still, the risks are high: Falsehoods, misstatements and even misspellings can contribute to a loss of trustworthiness. While early-day television suited the civility of John Kennedy, Twitter is a medium made for the blunt character of Donald Trump.

First lady Melania Trump listens as President Trump speaks to reporters in the Oval Office in April. (Evan Vucci /Associated Press)

The march of history and the power of modern technology — as well as a sharp swing in the political pendulum — make today almost unrecognizable from the 1960s. But the Kennedy approach to managing the media still stands as a kind of lesson book on amiable press relations for presidents.

Kennedy had a gift for casual humor, which he called upon sometimes to evade an inquiry or ease a tense moment. Wit disguises being thin-skinned, and a good laugh with the media creates an illusion of inclusiveness: Together the president and the press corps are sharing a joke, a communal act that only draws the two sides closer. During the 1960s, crowd sizes at political events were as important — and debatable — as they are today. After one of his campaign rallies, the Kennedy team announced that some 35,000 people had come out to see the candidate, a figure far above what reporters on hand had estimated. When challenged, Kennedy chose humor as a way to minimize the discrepancy. Ben Bradlee, who was then Newsweek’s Washington bureau chief and later The Washington Post’s executive editor, recounted the story in his book “Conversations With Kennedy.” In his telling, Kennedy explained to reporters that crowd-counting fell to his press secretary Pierre Salinger, who was known by his nickname Plucky. “Plucky counts the nuns,” Kennedy told reporters, “and then multiplies by 100.” And with that, reporters — amused and grateful for the attention — dropped their bone about the crowd count and turned to other issues.

By contrast, Trump attacked news outlets when they reported on photographs showing that the crowd on the Mall for his inauguration paled beside the swarms that had turned out for Barack Obama in 2009. Speaking at the CIA on his first full day in office, the new president said of the coverage: “It’s a lie,” adding, “We caught them. ... We caught them in a beauty.” Trump’s statement about the media was demonstrably false, as the side-by-side photographs of the two inaugurations showed. But at a time when the news profession is generally held in low esteem — a Washington Post-ABC poll in late April found that 52 percent of Americans believe journalists regularly produce false stories — Trump knows journalists are an easy target, particularly among his most fervent supporters. If Kennedy sought to win over the media to garner positive coverage, Trump has embraced an entirely different tactic in dealing with journalists. Accusing reporters of lying — even when his accusation is false — enhances Trump’s trustworthiness among his voters: In the same poll, 78 percent of Trump supporters said they believe news organizations regularly distribute false stories and 80 percent believe that false news reports are a bigger problem than Trump’s falsehoods; only 3 percent think Trump’s falsehoods are a bigger problem. In such an environment, the Kennedy rules for success with the media become irrelevant. Trump has changed the game.

Jay Rosen, who teaches journalism at New York University, believes that Trump’s aggressive response to the crowd photos set the tone for his administration. The photos were conclusive to anyone who saw them, but Trump demanded that his followers see an alternative truth. “It was a kind of power message to his supporters,” says Rosen, who writes the blog PressThink. “What he was saying was if you want to be on the team, you’re going to have to deny the evidence of your own senses.” While the strategy plays to the Trump base, it has an even deeper mission. “The purpose of his behavior is to detach his supporters from the rest of the information sphere and make Trump a more trusted source of news than the journalistic class.”

The media covering the Kennedy presidential campaign. (Paul Schutzer/The LIFE Premium Collection/Getty Images)

Although Kennedy concealed some aspects of his life — among them, his womanizing and the extent of his poor health — he retains high popularity today in part because he was perceived as communicating honestly with the media and the American people. Historian Robert Dallek attributes his enduring appeal to “the public’s faith in Kennedy’s sincerity.”

Kennedy demonstrated a respect for the role of the media by holding regular news conferences, about 64 of them for an average of one every 16 days. The Q&As were “relished by the reporters and by the television audience,” in the words of his aide, historian Arthur Schlesinger. And America tuned in: On average some 18 million viewers watched each press meeting. An April 1962 Gallup poll found that 3 out of every 4 American adults had seen a Kennedy news conference, or heard one on the radio. Ninety-one percent of those polled said the president’s performance left them with a favorable impression. “Most important,” Dallek observed, “whether on television or in person, Kennedy came across to the public as believable.”

That’s not to say that relations between the White House and the media were never strained or that Kennedy always told reporters the truth. About two weeks before he launched the Bay of Pigs invasion of Cuba in April 1961, reporters dug up details of the clandestine mission. According to historian Michael O’Brien, the president fumed to an aide: “I can’t believe what I’m reading. Castro doesn’t need agents over here. All he has to do is read our papers. It’s all laid out for him.”

But the president did not go public with his gripes. Kennedy respected the American tug of war between a president and the media over preservation of secrets and disclosure in the public interest. But he also used his skills of persuasion and the power of his office to cajole editors to downplay sensitive revelations. When he felt it was necessary, Kennedy was not above shading the truth to meet his political needs. At a news conference just days before the Cuba invasion, the president told reporters: “I want to say that there will not be, under any conditions, an intervention in Cuba by the United States armed forces.” That was technically true: The American military was not going to land on Cuban shores; the invasion force comprised CIA-trained Cuban exiles financed by the United States.

When the force was quickly routed and the Bay of Pigs invasion became an embarrassing debacle for the president, Kennedy did not attempt to shift blame. His military and intelligence advisers had assured him of the strategy’s soundness, and Kennedy forever regretted heeding their opinions. CIA Director Allen Dulles lost his job in the aftermath. But publicly Kennedy took the failure fully upon himself. “There’s an old saying that victory has 100 fathers and defeat is an orphan,” he told reporters at his April 21, 1961, news conference, adding: “I am the responsible officer of the government.”

Trump steers clear of admitting any missteps and resists correcting false statements. After claiming in four tweets without any proof that President Obama wiretapped him in Trump Tower, Trump maintained his assertion in the face of mounting evidence to the contrary. As the story evolved, there were indications that Trump’s communications with some of his aides had been picked up by U.S. intelligence agencies through “incidental collection.” Despite his assertions, those revelations did not constitute any vindication of Trump’s claim against Obama. Similarly, in the face of facts to the contrary, the president has steadfastly clung to the fiction that massive voter fraud accounted for Hillary Clinton winning the popular vote by almost 3 million votes.

(Illustration by Jack Hughes /For The Washington Post)

In 1945, at age 28, John Kennedy was himself a journalist, uncertain whether his destiny led to life as a writer or a politician. Hired by the Hearst newspaper the Chicago Herald-American, he was in San Francisco in April and May to cover the United Nations Conference, where 50 nations gathered to work out final details of the new organization’s charter. Just a temporary stint, the job gave Kennedy an appreciation for the role and character of journalists, a perspective he carried with him throughout his days as a politician. He enjoyed the company of journalists, whom he found well-­informed, even intellectual, and who kept him up-to-date on important issues.

“Kennedy himself genuinely liked reporters,” Bradlee recalled. “Some of his best friends ... were in fact reporters.” The camaraderie between journalists and the president meant that reporters tended to cut Kennedy some slack, even protecting him by holding back potentially damaging rumors about his sexual escapades, illnesses and drug use. Bradlee himself faced criticism as a journalist for his close relationship with the president. But he insisted in his memoir, “A Good Life,” that he and the president respected “the complicated perimeters of our friendship and the conflict between friendship and journalism.”

As early as 1956, Kennedy had developed remarkable rapport with newsmen — and they were almost all men. During that year’s Democratic National Convention, as reported by Richard Reeves in his book “President Kennedy: Profile of Power,” Sen. Kennedy casually began to walk in his underwear from his bedroom into the sitting room of his hotel suite, where reporters and photographers were gathered. An associate called out in alarm: “You can’t go out there in your shorts.” To which Kennedy replied, “I know these fellows. They’re not going to take advantage of me.” And, as Reeves concludes: “They rarely did.”

In the early days of his celebrity ascent, Trump appreciated the media for aiding his popularity. Obliging reporters, editors and TV producers assured the real estate mogul of vast coverage and many magazine covers. But as he ventured into politics, his friendship with inquiring reporters, whose attention he had craved, took on a different complexion. As president, Trump has become accountable to the nation and is subjected to the watchdog of the press. Yet he has held few news conferences, and when he has spoken publicly — other than on Twitter — he has generally appeared before more sympathetic reporters on Fox News. His war with journalists has escalated as he has repeatedly labeled legitimate newspapers and broadcasters as propagators of fake news, and tweeted, in the spirit of Nixon, the “FAKE NEWS media ... is the enemy of the American people.”

During the campaign and into the White House, Trump has belittled, badgered and evaded reporters, calling them “scum,” “the lowest form of life” and “among the most dishonest human beings on Earth.” His chief strategist, Stephen K. Bannon, voiced a particularly extreme sentiment when he declared that the media “is the opposition party. They don’t understand this country.” His remarks, which Trump endorsed, go beyond the hyperbole of labeling the press as enemies and suggest a failure to appreciate the fundamental American principle that presidential power is subjected to checks and balances, in particular, by a free press not beholden to politics or parties. Indeed, other top candidates seeking the most powerful political position in the world face rigorous scrutiny: Hillary Clinton was not immune to aggressive reporting on her handling of sensitive emails while secretary of state and other aspects of her career.

Sesno, now director of the School of Media and Public Affairs at George Washington University, believes Bannon’s charge is misguided. “He’s wrong about the media being the opposition party, because an opposition party seeks to defeat the party in power in order to be in power,” Sesno says. “I know of no reporter who as part of his job is campaigning for office.”

President Kennedy understood the crucial role of a vigorous free press in a democracy and liked to point out the absence of journalistic freedom in the Soviet Union. In an interview with Sander Vanocur of NBC News in December 1962, the president expressed his unhappiness about certain reporting — “it is never pleasant to be reading things that are not agreeable news” — but acknowledged that the news media were “invaluable ... as a check really on what is going on in the administration.” He noted that under the Soviets’ totalitarian regime, Premier Nikita Khrushchev was able to operate in secret without any challenge. “There isn’t any doubt,” Kennedy concluded, “that we could not do the job at all in a free society without a very, very active press.”

Steven Levingston is a Washington Post editor and author of “Kennedy and King: The President, the Pastor, and the Battle Over Civil Rights,” due out in June. Researcher Eddy Palanzo contributed to this report. To comment on this story, email wpmagazine@washpost.com or visit washingtonpost.com/magazine.