81654
geplaatste codes!
Plaats #33080 (Java)
Gepost op
19-10-2008 15:51
door
keffie91
Downloaden als .txt-bestand
-
Bewerk en post opnieuw
import java.awt.*;
import java.io.*;
public
class
Line
implements
Serializable
{
public
Point
p1, p2;
/* new Points, the points where you pressed and
released the mouse*/
public
Line
(
)
{
p1 =
new
Point
(
)
;
p2 =
new
Point
(
)
;
}
public
Line
(
Point
a,
Point
b
)
{
p1 =
new
Point
(
a
)
;
p2 =
new
Point
(
b
)
;
}
public
void
draw
(
Graphics
g
)
{
//draw the line
g.
drawLine
(
p1.
x
, p1.
y
, p2.
x
, p2.
y
)
;
}
}
© 2013
Sitemasters.be
- Gehost door
Vircon