private void reset(Component newOwner,Component newContents,int newX,int newY,Popup newPopup){
  this.owner=newOwner;
  this.contents=newContents;
  this.popup=newPopup;
  this.x=newX;
  this.y=newY;
  if (newOwner instanceof JComboBox) {
    return;
  }
  final Dimension contentsPrefSize=newContents.getPreferredSize();
  if (contentsPrefSize.width <= 0 || contentsPrefSize.height <= 0) {
    return;
  }
  for (Container p=newContents.getParent(); p != null; p=p.getParent()) {
    if (p instanceof JWindow || p instanceof Panel) {
      p.setBackground(newContents.getBackground());
      heavyWeightContainer=p;
      break;
    }
  }
  final JComponent parent=(JComponent)newContents.getParent();
  oldOpaque=parent.isOpaque();
  oldBorder=parent.getBorder();
  parent.setOpaque(false);
  parent.setBorder(SHADOW_BORDER);
  if (heavyWeightContainer != null) {
    heavyWeightContainer.setSize(heavyWeightContainer.getPreferredSize());
  }
 else {
    parent.setSize(parent.getPreferredSize());
  }
}

private void reset ( Component newOwner , Component newContents , int newX , int newY , Popup newPopup ) { this . owner = newOwner ; this . contents = newContents ; this . popup = newPopup ; this . x = newX ; this . y = newY ; if ( newOwner instanceof JComboBox ) { return ; } final Dimension contentsPrefSize = newContents . getPreferredSize ( ) ; if ( contentsPrefSize . width <= 0 || contentsPrefSize . height <= 0 ) { return ; } for ( Container p = newContents . getParent ( ) ; p != null ; p = p . getParent ( ) ) { if ( p instanceof JWindow || p instanceof Panel ) { p . setBackground ( newContents . getBackground ( ) ) ; heavyWeightContainer = p ; break ; } } final JComponent parent = ( JComponent ) newContents . getParent ( ) ; oldOpaque = parent . isOpaque ( ) ; oldBorder = parent . getBorder ( ) ; parent . setOpaque ( false ) ; parent . setBorder ( SHADOW_BORDER ) ; if ( heavyWeightContainer != null ) { heavyWeightContainer . setSize ( heavyWeightContainer . getPreferredSize ( ) ) ; } else { parent . setSize ( parent . getPreferredSize ( ) ) ; } }
reinitializes this shadowpopup using the given parameters .
