I know there are stack overflow questions on here about this but I am not extending canvas in my class. Is there any other way to just draw an image on the background?
//setting up a JFrame with other stuff
Canvas c = new Canvas();
Image img;
try {
img = ImageIO.read(new URL("https://bitterli.us/namelogo.png").openStream());
img = img.getScaledInstance(700, 145, 0);
} catch (IOException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
}
c.setBackground(Color.black);
JPanel p = new JPanel();
c.setBounds(100, 500, 1050, 500);
p.setLayout(new BorderLayout());
p.add(c, BorderLayout.CENTER);
p.setBounds(100, 50, 1050, 600);
frame.add(p, BorderLayout.NORTH);