Judge James Braxton Craven Jr., of the Fourth U.S. Circuit Court of Appeals died Thursday afternoon while playing tennis at the home of U.S. District Court Judge Robert R. Merhige in Richmond. Craven, 59, died of a heart attack.

Judge Craven, a judge for more than 20 years, with perhaps best known for his Richmond school desegregation opinion. He wrote the Fourth Circuit opinion explaining its 1972 decision to reverse an order that Richmond's decaying largely black schools be merged with suburban schools to achieve racial balance. Judge Craven said no evidence was found that the school system was practicing segregation and that the states, not the federal government, have the power to draw local political boundaries.

Judge Craven also served on a three-judge panel that ruled unconstitutional a pretrial gag order in the criminal case of Maryland Gov. Marvin Mandel and five codefendants. The gag order was imposed by U.S. District Court Judge John H. Pratt.

"It would be hard to classify him," as a liberal or conservative, said Judge Craven's law clerk, Elizabeth Gibson. "But I think in the Fourth Circuit, he's liberal."

The Fourth Circuit includes Virginia, Maryland, West Virginia, North Carolina and South Carolina.

Judge Craven was scheduled to hear an appeal today by the Fairfax County School Board of a lower court decision allowing the Hayfield High School student newspaper in Fairfax to print a story about birth control. U.S. District Court Judge Albert V. Bryan Jr. had ruled that the student paper was covered by First Amendment free press rights.

"On civil rights and the First Amendment he was liberal," Ms. Gibson said. "On criminal law he was probably more conservative."

It is not know when Judge Craven's seat will be filled because of a recent executive order by President Carter restructuring the proceudre for appeallate judge selection.

Carter's order established 12 appeallate panels, at least one foreign circuit, composed of citizens of the circuit, half of whom would be nonlawyers and minorities. The panel would select five nominees for the appellate judgeship, according to a Justice Department spokesman. Carter would select the judge from the five names.

Carter's systme is an attempt to replace the highly politicized method under which senators are exerted great influence over the Presidential selection of judges. Previously. senators of the President's party have recommended candidates for judgeships, and have often involved "senatiorial courtesy" to block appointments they disliked. In both the old and new systems, the President's appointment must be confirmed by the Senate.

Judge Craven, born in Asheville, N.C., was the son of a Methodist minister. He graduated with honors from Duke University and earned his law degree from Harvard.He practiced law in Morgantown, N.C. the same town where former Sen. Sam Ervin practiced, Gibson said.

"Sometimes he just tried to appear as the country lawyer," Gibson said, "Short of the down-home boy. He'd tell stories from his practice or things his father had told him. He saw more than just the legal issues."

"He'd make jokes on the bench. He didn't try to appear stern," Gibson said. "He tried to keep things informal."

After opening his law practice in 1946, Judge Craven served successively as solicitor to the Burke County Criminal Court, assistant U.S. attorney for Asheville and Charlotte and judge of the Supreme Court of North Carolina.He became a federal judge for the Western District of North Carolina in 1966 and was appointed to the appeals court seat by President Lyndon B. Johnson in 1966.