How can you use a Graphics object to create lines more than one pixel
in width?
Thanks.
hiwa - 14 Jun 2006 03:53 GMT
gimme_this_gimme_that@yahoo.com :
> How can you use a Graphics object to create lines more than one pixel
> in width?
>
> Thanks.
Use java.awt.Stroke and its descendants.
Thomas Weidenfeller - 14 Jun 2006 09:05 GMT
> How can you use a Graphics object to create lines more than one pixel
> in width?
Hope that it is actually a Graphics2D object (like it is in reality in
Swing paintComponent() methods, cast Graphics to Graphics2D and use the
Java2D API to paint lines of different types.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Vova Reznik - 14 Jun 2006 14:24 GMT
> How can you use a Graphics object to create lines more than one pixel
> in width?
>
> Thanks.
More than 1 pixel in width line is rectangle.
See Graphics#fillRect(int, int, int, int)
fill3DRect(int, int, int, int, boolean)
Thomas Weidenfeller - 14 Jun 2006 16:01 GMT
> More than 1 pixel in width line is rectangle.
Only for horizontal or vertical lines.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/