Citation :
import java.awt.Graphics;
import java.awt.Color;
import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.Image;
import java.awt.image.ImageObserver;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class System extends JPanel{
public void contentPane(Graphics g) {
try {
Image img = ImageIO.read(new File("Capture.png" ));
g.drawImage(img, 0, 0, this);
} catch (IOException e) {
e.printStackTrace();
}
}
}
|