paintComponent 只是重载祖先的的函数而以, 事件默认调用祖先的的函数,现在就调用JPanel的 ,没有什么特别的 .super当然是 JPanel的父类

解决方案 »

  1.   

    谢谢
    {
                      public void paintComponent(Graphics g) {               
                      ImageIcon img = new ImageIcon(ClassLoader.getSystemResource("images/Logo.JPG"));
                      g.drawImage(img.getImage(), 0, 0, null);
                      super.paintComponent(g);
                   }
                };
    是不是在创建panel 对象时执行呀!
    这叫什么技术?