PURPOSE: This randomized phase II trial is studying whole-brain radiation therapy and erlotinib to see how well they work compared with whole-brain radiation therapy alone in treating patients with advanced non-small cell lung cancer and brain metastases.