Code example for ParseException

0
 
	public Point2D.Double parse(String s) throws ParseException {
		int index = s.indexOf(',');
		if (index != -1)
			return new Point2D.Double(format.parse(s.substring(0, index)).doubleValue(), format.parse(s.substring(index+1)).doubleValue());
		throw new ParseException("Missing comma", 0);
	} 
	 
	public Point2D.Double fromBase(Point2D.Double p) {
		return p;
	} 
	 
	public Point2D.Double toBase(Point2D.Double p) {
		return p;
	} 
 
	public String getDefaultName() {
		return "Screen Coordinate System"; 
	} 
}