Clean the cabinets very well. Use a rag soaked with soapy water first, and finish with trisodium phosphate (TSP). Follow the TSP manufacturer's directions because that substance is a very toxic degreasing agent. Wear latex gloves when using TSP. Give the cleaned cabinets time to dry.
Remove the doors from the cabinets by taking out the hardware's screws. Remove the hardware from the doors. If you plan to paint only the doors and not the rest of the cabinets, then move the doors outside or to a different well-ventilated area for the painting process. If you plan to paint the cabinets, ensure the room is ventilated sufficiently. Open windows and doors.
Sand the layer or layers of melamine on the cabinets with 80-grit sandpaper. Sanding helps primer stick.
Paint the cabinets with melamine primer. Use the painting utensils recommended on the can of melamine primer; for example, the directions may recommend a paintbrush or a paint roller. Follow all the primer manufacturer's directions for priming, including directions regarding room humidity and drying time. Wait for the primer to dry.
Sand the primer lightly with 220-grit sandpaper. Paint over the primer with melamine paint. Follow all paint manufacturer's directions. Wait for the paint to dry.
Reattach the hardware to the cabinet doors, and reattach the doors to the cabinets.