switched to use java.net  Canvas API