Re: How to draw a simple line....
- From: "visionset" <spam@xxxxxxxxxxxx>
- Date: Sun, 27 May 2007 16:34:41 GMT
"TheBigPJ" <TheBigPJ@xxxxxxxxx> wrote in message
news:1180283348.916553.87450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Good Morning/Evening
Could someone please show me how to draw just a simple line from say
1,1 to 25,25 using the 2d package?
package test;
import java.awt.Graphics;
import javax.swing.JFrame;
public class LineTest extends JFrame {
public LineTest() {
setBounds(0,0,100,100);
setVisible(true);
}
protected void paintComponent(Graphics g) {
g.drawLine(0,0,25,25);
}
public static void main(String... args) {
new LineTest();
}
}
--
Mike W
.
- Follow-Ups:
- Re: How to draw a simple line....
- From: visionset
- Re: How to draw a simple line....
- References:
- How to draw a simple line....
- From: TheBigPJ
- How to draw a simple line....
- Prev by Date: How to draw a simple line....
- Next by Date: Re: How to draw a simple line....
- Previous by thread: How to draw a simple line....
- Next by thread: Re: How to draw a simple line....
- Index(es):