
-----------------------------------
Kobe300
Sat Feb 28, 2009 12:31 am

Need help with the procedure
-----------------------------------
Hi

I am trying to make a enimated picture but i have to copy 50 lines of what i want to stay in front , worst parts is i have to copy it like 5 times so if i need help so that i can put it in a procedure and call the procedure 5 times

How can i put this in a procedure


// The "HappyFace" class.
import java.awt.*;
import hsa.Console;

public class HappyFace
{
static Console c; // The output console

public static void main (String[] args)
{
c = new Console ();

c.setColor (Color.yellow);
c.fillOval (100, 100, 300, 300);

c.setColor (Color.white);
c.fillOval (170, 180, 40, 40);
c.fillOval (285, 180, 40, 40);


c.setColor (Color.pink);
c.fillArc (202, 270, 100, 100, 0, -180);

// Place your program here. 'c' is the output console
} // main method
} // HappyFace class

-----------------------------------
Tony
Sat Feb 28, 2009 12:47 am

RE:Need help with the procedure
-----------------------------------
There are no procedures, only methods. Though first you need to understand what a class is, then instance of a class and method or static methods.

-----------------------------------
Kobe300
Sat Feb 28, 2009 12:55 am

Re: RE:Need help with the procedure
-----------------------------------
my teacher did teach in  that detail but i remember from truing that there's a procedure statement but if java doesn't have that so how can i redraw anything besides copying codes every time. and yes i found this website look over please and let me know if there's any possible way to (call) things.

look over this and please let me know if u know how to use it

http://www.exforsys.com/forum/java-tutorials/208-difference-between-statement-callable.html


please :cry: 

please :cry: 
i got a assignment

thanks :wink:

-----------------------------------
Tony
Sat Feb 28, 2009 1:07 am

Re: RE:Need help with the procedure
-----------------------------------
how can i redraw anything
methods

-----------------------------------
Kobe300
Sat Feb 28, 2009 1:18 am

Re: RE:Need help with the procedure
-----------------------------------
how can i redraw anything
methods

ok method! what do i have write or call to get this method thing to work for me

-----------------------------------
Tony
Sat Feb 28, 2009 2:13 am

RE:Need help with the procedure
-----------------------------------
review your class notes for the material I've mentioned above. Then start reading http://compsci.ca/v3/viewtopic.php?t=17280
