This is a simple java program . In this section, you
will learn how to create Line Drawing. This program implements a line Drawing
component. A java program explains the stroke line i.e. how to make thick and
thin line. For this we have used
class. This object is passed to the setStroke() method.
First of all, define a class named,
program for creating a java AWT Line Drawing component. This program uses
the setStroke() method. The stroke describes the pen and brush. It is used for
drawing the line. This controls all drawing line attribute. It is a suitable of all line drawing needs.
BasicStroke(): This is a constructor component. A BasicStroke object is used for several different-different line drawing attributes. The BasicStroke() objects are immutable, So its can be safely cached and shared.
Here is the code of this Program:
Output of this program:
Rs. 20,000 US$ 300
Today: Rs. 10,000 US$150
Course Duration: 30 hrs
Posted on: March 13, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles