AppletViewerPanel(URL documentURL,Hashtable atts){
  this.documentURL=documentURL;
  this.atts=atts;
  String att=getParameter("codebase");
  if (att != null) {
    if (!att.endsWith("/")) {
      att+="/";
    }
    try {
      baseURL=new URL(documentURL,att);
    }
 catch (    MalformedURLException e) {
    }
  }
  if (baseURL == null) {
    String file=documentURL.getFile();
    int i=file.lastIndexOf('/');
    if (i >= 0 && i < file.length() - 1) {
      try {
        baseURL=new URL(documentURL,file.substring(0,i + 1));
      }
 catch (      MalformedURLException e) {
      }
    }
  }
  if (baseURL == null)   baseURL=documentURL;
}

AppletViewerPanel ( URL documentURL , Hashtable atts ) { this . documentURL = documentURL ; this . atts = atts ; String att = getParameter ( "codebase" ) ; if ( att != null ) { if ( ! att . endsWith ( "/" ) ) { att += "/" ; } try { baseURL = new URL ( documentURL , att ) ; } catch ( MalformedURLException e ) { } } if ( baseURL == null ) { String file = documentURL . getFile ( ) ; int i = file . lastIndexOf ( '/' ) ; if ( i >= 0 && i < file . length ( ) - 1 ) { try { baseURL = new URL ( documentURL , file . substring ( 0 , i + 1 ) ) ; } catch ( MalformedURLException e ) { } } } if ( baseURL == null ) baseURL = documentURL ; }
construct an applet viewer and start the applet .
