Saving the State!

Hi Guys

Need a bit of help in designing a framework to save and subsequently restore the state of an object in a relational database.

To elaborate, the object is a JButton. It's property of interest are background color, label and whether or not it is enabled. I have created a bean to represent the aforementioned attributes but I can't figure out how to represent the action associated with the button click and the recipient of the action.

I think I should use the command pattern to separate the action from the recipient. What do you guys think. It would be fantastic if someonce can share his/her insights.

Cheers

Vic

[662 byte] By [vics_31a] at [2007-10-2 10:48:45]
# 1
Just so you know, Java's Action class is an implementation of the Command pattern.
jvaudrya at 2007-7-13 3:05:31 > top of Java-index,Other Topics,Patterns & OO Design...