Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Overriding stop() method in Applets

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could someone please clarify what the stop() method does exactly? I've been overriding it in my applets to set threads to null and overriding the start() method to call thread.start(). Say the user scrolls the browser window down and the applet goes off screen, is the stop() method called then? And when the applet reappears on screen, is the start() method called then? And is what I'm doing correct? It seems to work fine, just wanted to make sure that was following good coding guidelines. Thanks!
 
Michael Bruesch
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allright, I think I've figured it out for the most part. The thing that's confusing me is that the class Canvas has a paint method that requires overriding also. I tried overriding it in an Applet, but I'm not sure which paint method I overrided, the Applet's paint method or the Canvas's paint method. Please clarify before I go insane. Thanks!
 
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic