tb.add(new JButton(new ImageIcon("RECT1.gif")));//
改为
tb.add(new JButton(new ImageIcon(getCodeBase()+"RECT1.gif")));//

解决方案 »

  1.   

    gja106(中文字符):好像还是不对,运行时报错,applet未能初始化。
      

  2.   

    html只要像如下修改,即可:
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codeBase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"
    width=300
    height=320
    align=center>
    <param name="code" value="*****.class">
    </OBJECT>
      

  3.   

    hexiaofeng(java爱好者) 我的环境是 2000professional ie 6 jdk 1.4 java plug_in 1.4
    报错:appletAppletPanel can not access a mumber