Ricky's method works. He uses the reflection API to find setter methods that match the names of the properties you want to set and calls them. That's OK, but it is a low-level approach. You could also use the
Java Beans API to do this. Example:
Call it like this:
[ August 14, 2007: Message edited by: Jesper Young ]