java gui panel help please
<p>i would like to have the image appear on top of the grid however they seem to be packed into to different panels. please help</p>

<pre><code>import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.*;

@SuppressWarnings("serial")
public class test4 extends JPanel {

BufferedImage image;
Dimension size = new Dimension();

public test4(BufferedImage image) {
    this.image = image;

JPanel content = new JPanel(new GridLayout(8,8)); 

for (int i = 0; i &lt; 8*8; ++i) { 
    JPanel panel = new JPanel(); 

    if ( i % 2 == i/8 % 2) {
        panel.setBackground(Color.WHITE); 
    } else {
        panel.setBackground(Color.DARK_GRAY); 
    }
        content.add(panel); 
    } 
        this.add(content); 
    }

protected void paintComponent(Graphics g) {
    int x = 100;
    int y = 300;
    g.drawImage(image, x, y, this);
}

public static void main(String[] args) throws IOException {
String path = "images/Untitled.png";
BufferedImage image = ImageIO.read(new File(path));

test4 test = new test4(image);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_O…
    f.add(test);
    f.setSize(400,400);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }
}
</code></pre>
