commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Smith, Pamela" <>
Subject [betwixt] - Handling java.awt.Point, Dimension and KeyStroke
Date Wed, 10 Mar 2004 21:25:13 GMT
I have a bean with properties whose types are non bean compliant Java classes -- java.awt.Point,
java.awt.Dimension and java.awt.KeyStroke.  The xml is written correctly, but after parsing,
the resulting instances don't have the right values since Point, Dimension and KeyStroke are
not beans.

Has anyone already solved this problem?



<?xml version="1.0" encoding="UTF-8"?>

BeanReader reader = new BeanReader();
reader.registerBeanClass("Point", java.awt.Point.class);
Point p = (Point)reader.parse...

The resulting point is not [10,15] since there is no setX() and setY() on java.awt.Point.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message