When declared,

Retained earnings 6000
Dividend payable 6000

When paid,

Dividend payable 6000
Cash 6000