aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes There is a Line Object? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "There is a Line Object?" Watch "There is a Line Object?" New topic
Author

There is a Line Object?

Julio Nardi
Greenhorn

Joined: Oct 28, 2004
Posts: 1
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.

Thanks,very much!

Julio.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: There is a Line Object?