Cannot reduce the visibility of the inherited method from 编译错误
编译如下代码时,JDesktopPaneDESKTOP_PANE=newJDesktopPane(){
protectedvoidpaintComponent(Graphicsg){
g.drawImage(image,0,0,getWidth(),getHeight(),null);
//g.drawImage(image,0,0,500,400,null);
}
};
一切正常。编译如下代码