source: src/main/java/bargainingchips/etc/Line.java@ 343

Last change on this file since 343 was 316, checked in by Tim Baarslag, 5 years ago

new packages complete

File size: 537 bytes
Line 
1package bargainingchips.etc;
2
3import java.awt.Canvas;
4import java.awt.Color;
5import java.awt.Graphics;
6
7
8/**
9 * @author Faria Nassiri-Mofakham
10 *
11 */
12public class Line extends Canvas{
13
14 /**
15 *
16 */
17 private static final long serialVersionUID = 1L;
18
19 Color color;
20 int length;
21
22 public Line(Color c, int l)
23 {
24 color=c;
25 length=l;
26 }
27 public void paint(Graphics g)
28 {
29 g.setColor(color);
30 g.drawLine(g.getClipBounds().x,g.getClipBounds().y, g.getClipBounds().x+length,g.getClipBounds().y);
31 }
32
33}
Note: See TracBrowser for help on using the repository browser.