• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Which container can be used to load objects?

 
Malcolm Whitely
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I currently have a class that extends Thread and loads some sort of animation. Can anyone recommend a container with size/color attributes which I would be able to add the instance of the class to? I have tried a canvas and a panel but with no luck. I get a "Incompatible Type for method" error every time.
Thanks.
 
Linda Jones
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about making your class extend Canvas (or Panel) and implementing the Runnable interface.
Java Tutorial page on Runnable
Linda
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic