Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

To increase thickness of the line

Posted on 1997-12-16
2
Medium Priority
?
2,213 Views
Last Modified: 2008-02-01
How to draw thick line? Is there any method to increase the
thickness of the line...In drawline() method there is no parameter as such to increase the thickness..Please give me
a sample program if there is any..
0
Comment
Question by:geostp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
webster030697 earned 100 total points
ID: 1231659
You could use fillRect:

 public abstract void fillRect(int x,
                               int y,
                               int width,
                               int height)

    Fills the specified rectangle. The left and right edges of the rectangle are at x and x + width - 1. The top and
    bottom edges are at y and y + height - 1. The resulting rectangle covers an area width pixels wide by height
    pixels tall. The rectangle is filled using the graphics context's current color.

    Parameters:
        x - the x coordinate of the rectangle to be filled.
        y - the y coordinate of the rectangle to be filled.
        width - the width of the rectangle to be filled.
        height - the height of the rectangle to be filled.

0
 
LVL 2

Expert Comment

by:webster030697
ID: 1231660
Oops! Hit the button to soon.

I was going to add that the above only works for vertical, and horizontal lines (obviously). For lines at some other angle, the only thing I can think of is to draw several lines next to each other.

Otherwise you could write your own thickLine class - there are any number of ways to do this.
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question