用JFrame创建的窗体其自带的图标是一杯热咖啡的小图标,如何将其更换成自定义的图标呢?请高手指教。

解决方案 »

  1.   

    用Franme类的public void setIconImage(Image image)方法j2sdk1.4.2_10/docs/api/index.htmljava.awt.Frame中的方法,楼主好好看看吧
      

  2.   

    关键是Image对象的创建问题,即使创建了也不能正常运行.
      

  3.   

    void setIconImage(Image image) 
              Sets the image to be displayed in the minimized icon for this frame.