if (height != getHeight() || width != getWidth()){
if (height != (int)getVisibleRect().getHeight() || width != (int)getVisibleRect().getWidth()){
    public void paintComponent(Graphics g) {        if (partListDO != null && image!=null)        {            if (height != getHeight() || width != getWidth()){                setPartList(partListDO);            }            g.drawImage(image, 0, 0, null);        }        else            super.paintComponent(g);    }