This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hello! I am working in a modeling tool and I need to implement a association between two elements. I tried to use the method "drawLine" from Graphics class, but it does not work as I would like. The line constructed is only many pixels drew. I would like to have a object to draw the line, that I can move it and treat its events.
If someone knows something about it, please, send a help.
The java.awt.geom package has the abstract class Line2D which implements the Shape interface and contains the nested classes Line2D.Double and Line2D.Float. These classes and interface have methods for working with lines.