It is a java program that is designed to look like a Windows 10 Blue Screen Of Death, but I can not figure out how to add an image to it.
I have tried many different methods, but they did not work out for me, maybe I was doing them wrong. The Image is the QR code that is going to be on the lower left hand corner.
import javax.swing.JFrame;
import javax.swing.*;
import java.awt.*;
public class BSODJava {
public static void main(String[] args) {
JFrame frame = new JFrame("Lab00");
frame.setSize(1366, 768);
frame.setLocation(0, 0);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(new Panel1());
frame.setVisible(true);
frame.setBackground(Color.black);
}
}
class Panel1 extends JPanel {
public void paintComponent(Graphics g) {
g.setColor(new Color(6, 117, 170));
g.fillRect(1, 1, 1366, 768);
g.setColor(new Color(255, 255, 255));
g.setFont(new Font("Segoe UI", Font.PLAIN, 200));
g.drawString(";)", 50, 165);
g.setColor(new Color(255, 255, 255));
g.setFont(new Font("Segoe UI", Font.PLAIN, 52));
g.drawString("Your PC ran into a problem and needs to restart. We'll", 50, 270);
g.setColor(new Color(255, 255, 255));
g.setFont(new Font("Segoe UI", Font.PLAIN, 52));
g.drawString("restart for you.", 50, 330);
}
}