Unable to call paint() from inside method

Printable View