@Override
    public void removeImageFromAtlas(final Image image, final int x, final int y, final int w, final int h, final int atlasTextureId) {
        // Since we clear the whole texture when we switch screens it's not really necessary to remove data from the
        // texture atlas when individual textures are removed. If necessary this can be enabled with a system property.
        if (!fillRemovedTexture) {
            return;
        }

        ByteBuffer initialData = BufferUtils.createByteBuffer(image.getWidth() * image.getHeight() * 4);
        for (int i = 0; i < image.getWidth() * image.getHeight(); i++) {
            initialData.put((byte) 0xff);
            initialData.put((byte) 0x00);
            initialData.put((byte) 0x00);
            initialData.put((byte) 0xff);
        }
        initialData.rewind();
        modifyTexture(
                getTextureAtlas(atlasTextureId),
                new com.jme3.texture.Image(Format.RGBA8, image.getWidth(), image.getHeight(), initialData, ColorSpace.sRGB),
                x,
                y);
    }
Nifty GUI BatchRenderBackend Implementation for jMonkeyEngine.

@author void
jme3-niftygui/src/main/java/com/jme3/niftygui/JmeBatchRenderBackend.java