I want to increase the Line2D width. I could not find any method to do that. Do I need to actually make a small rectangle for this purpose?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should use
setStroketo set a stroke of theGraphics2Dobject.The example at http://www.java2s.com gives you some code examples.
The following code produces the image below:
(Note that the
setStrokemethod is not available in theGraphicsobject. You have to cast it to aGraphics2Dobject.)This post has been rewritten as an article here.