By dev.stonez
via blog.netopyr.com
Published: Jan 26 2012 / 10:35
Very often one has to create a number of of similar objects. Using JavaFX builders for this task instead of constructors has several advantages as we will see in this article.
In short, builders…
are easier to read and understand
avoid some “copy & paste”-bugs
result in small, but simple code, if builders are reused
When using JavaFX, you typically have to create a number of similar objects with only few attributes different. For example your screen may contain buttons, which have the same size and style, but different locations, labels, and event handlers. Or you want to use similar transitions for some elements.
Tweet
SaveShareSend
Tags: frameworks, gui, java, other languages



Add your comment