This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Applets and the fly likes Problem with methods to do graphics. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Problem with methods to do graphics. " Watch "Problem with methods to do graphics. " New topic
Author

Problem with methods to do graphics.

Brian Walsh
Greenhorn

Joined: Feb 06, 2002
Posts: 17
Hi again...
Sorry to bug you guys about the same old program but I am having having problems getting to the methods of Guest.java to do graphic commands. It all comppiled fine but when Diner.java implements
"placeCheck();" & "colorCheck(page);" it does'nt show up in the applet when I run it.
Here is:
Guest.java
Diner.java

THANK YOU SOOOOO MUCH FOR YOUR HELP!!!




I JUST WANTED TO LET YOU GUYS KNOW THAT THIS SITE MAKES ME LEARN THREE TIMES AS FAST, THANK YOU FOR YOUR INPUT.


-Thanks in Advance
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Moving this to applets


Dave
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Brian,
You are missing the part about transferring the constructor parameters to the class variables. You are not doing that; therefore you are only dealing with default class values. Do this for your Guest constructor and things should work out.

For some reason your constructor was accepting double for place and your class was defining it as integer. I went with integer.
The drawing was close but not quite right. Good start though!
Regards,
Manfred.
[ July 09, 2002: Message edited by: Manfred Leonhardt ]
 
jQuery in Action, 2nd edition
 
subject: Problem with methods to do graphics.