public SampleModel(int dataType, int w, int h, int numBands) {
        if (w <= 0 || h <= 0) {
            // awt.22E=w or h is less than or equal to zero
            throw new IllegalArgumentException(Messages.getString("awt.22E")); //$NON-NLS-1$
        }

        double squre = ((double) w) * ((double) h);
        if (squre >= Integer.MAX_VALUE) {
            // awt.22F=The product of w and h is greater than Integer.MAX_VALUE
            throw new IllegalArgumentException(Messages.getString("awt.22F")); //$NON-NLS-1$
        }

        if (dataType < DataBuffer.TYPE_BYTE ||
                dataType > DataBuffer.TYPE_DOUBLE &&
                dataType != DataBuffer.TYPE_UNDEFINED) {
            // awt.230=dataType is not one of the supported data types
            throw new IllegalArgumentException(Messages.getString("awt.230")); //$NON-NLS-1$
        }

        if (numBands < 1) {
            // awt.231=Number of bands must be more then 0
            throw new IllegalArgumentException(Messages.getString("awt.231")); //$NON-NLS-1$
        }

        this.dataType = dataType;
        this.width = w;
        this.height = h;
        this.numBands = numBands;

    }