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

Username:   Password: 
 RegisterRegister   
 Drawing Java
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
sk8boarder1414




PostPosted: Thu Apr 19, 2007 11:24 pm   Post subject: Drawing Java

Hey, wanted to print some shapes in java, came up with this.. what else do I need to make some shapes appear?
Doesn't work in my java.

class Helicopter
{
public void paint( Graphics g )
{
g.setColor(Color.blue);
g.fillOval(20, 20, 10, 10);
}

}
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Thu Apr 19, 2007 11:59 pm   Post subject: RE:Drawing Java

Nowhere have you given any indication that your class has any kind of Applet functionality. How would you do so?
sk8boarder1414




PostPosted: Sun May 06, 2007 8:27 pm   Post subject: Re: Drawing Java

well ok, if i included the package java.awt

and said

import java.awt.*;

How else would i get the shapes to appear, thats the pacakge for graphics.
Reality Check




PostPosted: Mon May 07, 2007 9:58 pm   Post subject: Re: Drawing Java

Read some tutorials...your problem is obviously going to require a whole explanation on Java and how it works since you obviously don't know. I could just tell you the code but there's no sense in that. You won't learn anything. Go read some tutorials.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: