2D API / NOTES</>↗2D API20 May 2012
The following code snippet show you how to draw a simple line using Graphics2D.draw() method. This method take a parameter that implements the java.awt.Shape interface. To draw a line we can use the Line2D.Double static-inner class. This class constructor takes four integers values that represent the start (x1, y1) and end (x2, y2) coordinate of […]
SPRING CORE / NOTES</>↗Spring Core13 May 2012
To wire or inject a null value into a bean we can use the <null> element. The configuration below show you how to do it in the Spring configuration file. You might need to wire a null value for instance when you want to override a value that was autowired into a bean. As you […]
SPRING CORE / NOTES</>↗Spring Core10 May 2012
This time we will demonstrate how to inject a java.util.Properties. This class store a key-value pairs of data where the key and the values are both in string. You can use the <props> element to wire a property collections. The bean we use in this example is taken from the previous example How do I […]
SPRING CORE / NOTES</>↗Spring Core10 May 2012
In this example you will see how to wire map collections. For this purpose we can use the <map> element in the Spring configuration file. This element declares the java.util.Map. We will reuse the bean that we use in the previous example How do I inject collections using list element in Spring?. The <map> element […]
SPRING CORE / NOTES</>↗Spring Core09 May 2012
In this example you will see how to use the <set> element to wire a collection property of a bean. We will reuse the bean that we use in the previous example How do I inject collections using list element in Spring?. The Album bean have a songs property that have a type of java.util.List. […]
SPRING CORE / NOTES</>↗Spring Core09 May 2012
The following example show you how to use the <list> element to wire collection property. We can use it to wire property of either arrays or some implementation of java.util.Collection such as java.util.ArrayList. For this example we will create a bean called Album that have a collection of Song beans in it. So here is […]