code: public void printScreen(BaseScreen screen, PrintWriter out)
      {
          try {
              ResourceBundle reg = ((BaseApplication)this.getTask().getApplication()).getResources(HtmlConstants.XML_RESOURCE, false);
              String string = XmlUtilities.XML_LEAD_LINE;
              out.println(string);
          
              String strStylesheetPath = screen.getScreenFieldView().getStylesheetPath();
              if (strStylesheetPath != null)
              {
                  string = "<?xml-stylesheet type=\"text/xsl\" href=\"" + strStylesheetPath + "\" ?>";
                  out.println(string);
              }
              out.println(Utility.startTag(XMLTags.CONTENT_AREA));
          
              screen.printScreen(out, reg);
          
              out.println(Utility.endTag(XMLTags.CONTENT_AREA));
          } catch (DBException ex) {
              ex.printStackTrace();
          }
      }
docs: PrintScreen Method.