Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with methods to do graphics.

 
Brian Walsh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to applets
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic