Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 What am i doing wrong here?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
B-747




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
Hikaru79




PostPosted: 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);
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: