J.P. Morgan Chase CEO Jamie Dimon said that the escalating U.S.-China trade dispute is a "real issue" that could damage corporate confidence.

"I think trade is a real issue," Dimon said Tuesday at a conference in New York. "Trade has gone from being a skirmish to being far more important than that. If this goes south in a bad way, and you have other surprises, that could be part of the thing that changes confidence, changes peoples' willingness to invest."

Dimon, the longest-tenured CEO among the U.S. megabanks, was answering a question about the risks that could end the current economic expansion. The next recession will probably be caused by a confluence of factors that catch investors off guard, like impacts from the trade war or rising interest rates, he said. While U.S. growth could be in the last legs of its growth, that period could last years, he said.

"You're already starting to see businesses starting to think about moving their supply lines," Dimon said. "That can obviously slow down business investment and cause uncertainty of all different types."

The U.S.-China trade dispute, which has been simmering for the past year, took a turn for the worse this month after President Donald Trump announced he was boosting tariffs on $200 billion of Chinese goods to 25% from 10%. The news roiled global stock markets as China responded with its own heightened tariffs. Then the U.S. announced restrictions on Chinese telecommunications manufacturer Huawei, effectively banning it from buying parts from American firms.

Chinese authorities are weighing whether they will retaliate further against the U.S., and Chinese President Xi Jinping ramped up his rhetoric on the trade war by saying China is embarking on a "new Long March, and we must start all over again!"

Dimon also reiterated a warning he has made before: If bad news happens during an actual economic downturn, markets might respond violently. In his mind, the stock meltdown late last year was an example of the markets' brittle nature.

"I'm just telling people, we should be prepared that when we actually have a bad environment, it'll be that and worse," he said. "The markets will be worse off than people think and that can cause people to panic a little bit faster than they should."

Separately, Dimon also weighed in on the CEO search currently under way at Wells Fargo. Former CEO Tim Sloan announced in March that he was stepping down immediately, bowing to pressure from regulators and politicians who were frustrated at the pace of change at the bank.

"I think Tim Sloan was doing a good job but I think it's not responsible for a company — this is my own view — to have a CEO leave with no plan in place," Dimon said. "How can the regulators be pushing something irresponsible? So I don't know if it was a board-level decision, I don't know if they felt pressure from whatever, but it's not the way to run the railroad."

WATCH: Jamie Dimon says trade a real issue for investors