sfcs1.gif 和你的class放在一起

解决方案 »

  1.   

    html代码如下:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    <html>
      <head>
        <title></title>
      </head>  <body topmargin="0" rightmargin="0" leftmargin="0">
         
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 100% HEIGHT = 100%  codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = CODE VALUE = Sfcs>
    <PARAM NAME = CODEBASE VALUE = "." >
    <PARAM NAME = ARCHIVE VALUE = "Sfcs.jar"><PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="scriptable" VALUE="false"></OBJECT>
     </body>
    </html>
    错误如下:
           异常:null
         
      

  2.   

    放在一起的。并且用jar一并打进sfcs.jar 中了。
           ....URL codebase=getCodeBase();
    Icon sfcs_icon1=new ImageIcon(codebase,"sfcs1.gif");
    JMenuBar menubar=new JMenuBar();
    JRadioButton sfcs_bar=new JRadioButton(sfcs_icon1);     .....
      

  3.   

    URL codebase = getDocumentBase() ;
              
      

  4.   

    不行啊!这个方法我已试过!!很多书上用:Icon sfcs_icon1=new ImageIcon("sfcs1.gif");
    这样在本地可以,但作为JApplet放在网上进行浏览会提示不能读sfcs1.gif文件!!
    to:hexiaofeng()您可以具体试一下,通过中应用服务器!
      

  5.   

    不行啊!这种方法我已试过!书上用:Icon sfcs_icon1=new ImageIcon("sfcs1.gif");
    在本地机上可以浏览,但真正放在网上却会提示不能读sfcs1.gif等的错误提示!!to: hexiaofeng(java爱好者)您可以具体试一下,比如菜单条!通过应用服务器来浏览!!