avoid dependency on AppletContext.