Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

commands in canvas  RSS feed

 
yoga nandiwardhana
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
help, i'm having trouble with commands in canvas.
i have a canvas class that implements commandListener, but my setCommandListener(this) call generates and error. it said "cannot resolve symbol: method setCommandListener(Game)". Game is my canvas class name. if i remove the setCommandListener call, but keeps the addCommand()s, it went ok. the commands are added to the canvas.
why is this happening?
 
Hastono Bayu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your Game Canvas class must implements the CommandListener interface .
Check it out first
Regards,
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!