public CompoundIcon( Icon mainIcon, Icon decorator, int xAlignment, int yAlignment) { if (decorator.getIconWidth() > mainIcon.getIconWidth()) { throw new IllegalArgumentException( "decorator icon is wider than main icon"); } if (decorator.getIconHeight() > mainIcon.getIconHeight()) { throw new IllegalArgumentException( "decorator icon is higher than main icon"); } if (!isLegalValue(xAlignment, VALID_X)) { throw new IllegalArgumentException( "xAlignment must be LEFT, RIGHT or CENTER"); } if (!isLegalValue(yAlignment, VALID_Y)) { throw new IllegalArgumentException( "yAlignment must be TOP, BOTTOM or CENTER"); }  this.mainIcon = mainIcon; this.decorator = decorator; this.xAlignment = xAlignment; this.yAlignment = yAlignment;
public CompoundIcon() {
	public CompoundIcon(	  		Icon mainIcon, 			Icon decorator,			int xAlignment, 			int yAlignment) {		if (decorator.getIconWidth() > mainIcon.getIconWidth()) {	  		throw new IllegalArgumentException(	  			"decorator icon is wider than main icon");	    }		if (decorator.getIconHeight() > mainIcon.getIconHeight()) {	    	throw new IllegalArgumentException(	        	"decorator icon is higher than main icon");	    }		if (!isLegalValue(xAlignment, VALID_X)) {	    	throw new IllegalArgumentException(	    		"xAlignment must be LEFT, RIGHT or CENTER");	    }	    if (!isLegalValue(yAlignment, VALID_Y)) {	    	throw new IllegalArgumentException(	    		"yAlignment must be TOP, BOTTOM or CENTER");	    }	    	    this.mainIcon = mainIcon;	    this.decorator = decorator;	    this.xAlignment = xAlignment;	    this.yAlignment = yAlignment;	}