public void read(DOMInput in) throws IOException { double x = in.getAttribute("x", 0d); double y = in.getAttribute("y", 0d); double w = in.getAttribute("w", 0d); double h = in.getAttribute("h", 0d); setBounds(new Point2D.Double(x, y), new Point2D.Double(x + w, y + h)); readAttributes(in); }