protected static Point[] parsePoints(String string) {
        
        Vector points = new Vector();
        StringTokenizer tok = new StringTokenizer(string);
        
        try 
        {
            while (tok.hasMoreTokens())
            {
                int x = Integer.parseInt(tok.nextToken());
                int y = Integer.parseInt(tok.nextToken());
                
                points.addElement(new Point(x, y));
            }
            
        } catch (NumberFormatException e)
        {
            throw new RuntimeException("Could not parse x,y string:" + string);
        }
        
        //make an array out of the vector
        Point[] array = new Point[points.size()];
        points.copyInto(array);
        return (array);
        
    }