Two generic drug makers have settled with a subsidiary of Johnson & Johnson and another company concerning a drug used to treat attention deficit hyperactivity disorder.