Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2006

Tip: Looking for answers? Try searching our database.

More than 1 pixel width for java.awt.Graphics between coordinates

Thread view: 
gimme_this_gimme_that@yahoo.com - 14 Jun 2006 03:11 GMT
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/



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.