Paint application using jave se in swing