No. After the death of his officer Uriah, that David had arranged, the problem seemed to be solved. Nobody knew what David had done, except the Lord. The thing that David had done (2 Samuel 11:26) displeased the Lord. It was evil in the eyes of the Lord. David has broken at least four of the Ten Commandments: murder, adultery, lying, and coveting his neighbour’s wife.1
1 Have mercy on me, O God, according to your steadfast love; according to your abundant mercy blot out my transgressions.