Both of them will let you build a complex object graph provided you follow the usual conventions for beans, but the best thing IMHO is that OGB extends from FactoryBuilderSupport, thus enabling new features as "factory sharing". Suppose that you have a domain model where some classes are observable, i.e, they will fire
PropertyChangeEvent
s whenever one of their properties changes value, and you'd like to connect listeners at the same you build the graph, that sounds like a job for bind()
but that factory is available in SwingBuilder only. Should you copy the code? no need to, just register the BindFactory into your instance of OGB and your done! This is possible because SwingBuilder inherits from FBS also, take a look at the following example and see for yourselfNot only did the names of the employees were changed as the company's name was updated, but the value was also transformed, thanks to the options available on bind(). In case you were wondering, GraphicsBuilder does the same to support binding on shapes.
Keep on Groovying!