A new melamine surface is slick and smooth. This can be problematic for painting, as this type of surface naturally repels substances from sticking to it.
The solution is to rough up the surface with sandpaper, creating a more adherent, paint-friendly texture. Use a rough grit sandpaper in a circular motion to create tiny scratches all over the surface.
When the surface is coated in dirt, paint can adhere to this superficial layer rather than to the cabinet. Clean off all the residue from sanding, as well as any other dirty or greasy areas of the cabinet.
Use a wet cleaning agent and towels or paper towels to remove all the material.
Priming your cabinet before painting is important. Primer bonds more strongly to the cabinet than ordinary paint does, creating a superior contact with the surface.
An oil-based primer is preferable to latex. Oil-based primer is the more durable choice, but some people don't like to use it because it cleans up with mineral spirits rather than water and it takes much longer to dry.
Depending on the size of your cabinets, you can apply primer with a regular roller, trim roller, brush or a combination of these techniques. Allow the primer to dry completely before painting.
Use latex paint in the color of your choice to paint your cabinet. Clean your rollers and brushes with soap and water once you finish painting.
Use multiple coats to get a consistent surface.
Other Paint Options
When painting on melamine cabinets, you have choices besides latex paint. Melamine paint is specifically designed for this type of surface.
Oil paint is a highly adhesive and durable paint, and it's less prone to peeling than latex.