What am i doing wrong here?
Author |
Message |
B-747
|
Posted: Thu Mar 31, 2005 7:51 pm Post subject: What am i doing wrong here? |
|
|
Guys! i can't figure out this problem because this is my first time drawing stuff in Java! This is suppose to draw a line but i'm getting an error!
// The "Program2" class.
import java.awt.*;
import hsa.Console;
public class Program2
{
static Console c; // The output console
public static void main (String[] args)
{
c = new Console ();
int x1,x2,y1,y2;
x1=2;
x2=14;
x3=20;
x4=50;
void drawLine(x1,y1,x2,y2);
// Place your program here. 'c' is the output console
} // main method
} // Program2 class |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Hikaru79
|
Posted: Sat Apr 02, 2005 9:13 pm Post subject: (No subject) |
|
|
Try replacing Java: | void drawLine(x1,y1,x2,y2); | with Java: | c.drawLine(x1,y1,x2,y2); |
|
|
|
|
|
![](images/spacer.gif) |
|
|