• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

I am having proble with a method

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again,
I was wondering if I could get help with the ColorCheck method I built I think I am having problems with me putting the "Graphics page" between it's parathesis. If I did'nt when I would compile it would'nt recognize page.setColor in Guest.java. But when I would compile my second program it says I can't apply the Graphics page to Colorcheck (). So I don't know what to do....
-Here is the following in this order:
Code for Guest.java (program to set up methods)
Code for Diner.java (program to envoke methods)
Compile error for Diner.java

THANK YOU VERY MUCH FOR YOUR TIME AND HELP




(Marilyn split very long line)
[ July 06, 2002: Message edited by: Marilyn deQueiroz ]
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brian,
It looks like you're not calling the method correctly. You defined the method as the following:
public int ColorCheck (Graphics page)
This means that when you call the ColorCheck method, you must pass it a Graphics object. Try changing the problematic line in Diner.java to say the following:
Webly.ColorCheck( page );
Also, are you sure that you want the Guest class to extend Applet? It looks like it should actually extend Object.
Hope this helps,
-Stu
 
Brian Walsh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you that helped very much.....
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!