A Java Class for Cartesian Co-ordinate system in JPanel