What I would do is paint the background first, then paint the image over it, something like...
protected BufferedImage makeImageFrom(BufferedImage original) {
BufferedImage img = new BufferedImage(original.getWidth(), original.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = img.createGraphics();
g2d.setColor(Color.WHITE);
g2d.fillRect(0, 0, img.getWidth(), img.getHeight());
g2d.setColor(Color.LIGHT_GRAY);
int row = 0;
for (int y = 0; y < img.getHeight(); y += 10) {
int offset = (row % 2 == 0) ? 10 : 0;
for (int x = 0; x < img.getWidth(); x += 20) {
g2d.fillRect(offset + x, y, 10, 10);
}
row++;
}
g2d.drawImage(original, 0, 0, this);
g2d.dispose();
return img;
}

And the code used to test it...
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.text.ParseException;
import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
public class Test {
public static void main(String args[]) throws ParseException {
new Test();
}
public Test() {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
try {
JFrame frame = new JFrame();
frame.add(new TestPane());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
} catch (IOException ex) {
ex.printStackTrace();
}
}
});
}
public class TestPane extends JPanel {
private BufferedImage img;
public TestPane() throws IOException {
BufferedImage original = ImageIO.read(get your own image);
img = makeImageFrom(original);
}
protected BufferedImage makeImageFrom(BufferedImage original) {
BufferedImage img = new BufferedImage(original.getWidth(), original.getHeight(), BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = img.createGraphics();
g2d.setColor(Color.WHITE);
g2d.fillRect(0, 0, img.getWidth(), img.getHeight());
g2d.setColor(Color.LIGHT_GRAY);
int row = 0;
for (int y = 0; y < img.getHeight(); y += 10) {
int offset = (row % 2 == 0) ? 10 : 0;
for (int x = 0; x < img.getWidth(); x += 20) {
g2d.fillRect(offset + x, y, 10, 10);
}
row++;
}
g2d.drawImage(original, 0, 0, this);
g2d.dispose();
return img;
}
@Override
public Dimension getPreferredSize() {
return img == null ? new Dimension(100, 100) : new Dimension(img.getWidth(), img.getHeight());
}
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
if (img != null) {
int x = (getWidth() - img.getWidth()) / 2;
int y = (getHeight() - img.getHeight()) / 2;
g.drawImage(img, x, y, this);
}
}
}
}
I guess I didn't explain best. What I meant is, when the background is checkered (meaning it's a transparent image), the background should be clear and just have whatever has been painted in the background behind it. However right now, it will just fill the rest of the image height and width that are empty pixels with black? How do I prevent that? I was told by a friend it has to do with the alpha?
I'd be really nice if you could provide an image of what you want and what you have ;P
I modified the above code to use a transparent image as default base, clear the background and paint the rest as per before...I also changed the background color of the TestPane
to verify it ;)

protected BufferedImage makeImageFrom(BufferedImage original) {
BufferedImage img = new BufferedImage(original.getWidth(), original.getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = img.createGraphics();
g2d.setBackground(new Color(255, 255, 255, 0));
g2d.clearRect(0, 0, img.getHeight(), img.getHeight());
g2d.setColor(Color.LIGHT_GRAY);
int row = 0;
for (int y = 0; y < img.getHeight(); y += 10) {
int offset = (row % 2 == 0) ? 10 : 0;
for (int x = 0; x < img.getWidth(); x += 20) {
g2d.fillRect(offset + x, y, 10, 10);
}
row++;
}
g2d.drawImage(original, 0, 0, this);
g2d.dispose();
return img;
}