move paint() method below drawTriangle() method