Java - Giving background picture to a JFrame

Image bgImage = Toolkit.getDefaultToolkit().createImage(getClass().getResource("/src/ui/images/abc.jpg"));

public void paintComponent(Graphics g) {
        g.drawImage(bgImage,0,0,this);
}
 

Post a Comment

0 Comments