Shavack did not say how the gunman died. He said two police officers suffered non-life-threatening injuries.
Delaware Attorney General Beau Biden said at an afternoon news conference that the shooting was not a random act of violence but the result of a custody dispute.
"It's developed out of a long – over the course of many years – custody dispute in the courts of this state," he said.
Earlier, Shavak said the gunman opened fire before he passed metal detectors in the lobby.
Chick Chinski of Middletown said he was entering the courthouse to report for jury duty when he heard popping sounds.
"It didn't sound like gunfire first at all," said Chinski, adding that he saw the gunman pointing his weapon.
He said it seemed that the shooter deliberately targeted the two women who were shot as they stood in the middle of the lobby.
"Absolutely," he said. "It's right what he went after when he come in the door. That's exactly what he did instantly."
Chinski said that before the shooting, he shared an elevator with the gunman and others from the parking garage. The gunman was quiet and did not appear agitated, Chinski said.
In the hours after the shooting, dozens of police cars and emergency vehicles were on the streets surrounding the courthouse. Police searched the courthouse room by room as a precaution.