Assuming you are reading an image from a disk, you would do something like this.
URL url = getClass().getResource("images/BB.jpg");
BufferedImage picture = ImageIO.read(url);
Later, when you need to change XOrMode, you must do the following:
Graphics2D g = picture.createGraphics();
g.setXORMode(new Color(255,0,0) )
g.dispose();
fadein/fadeout, . , , void paintComponent(Graphics g).
, , - Filthy Rich . . - 4, . , .