You can extend the JOptionPane class and override the drawing method.
Edit: Depending on the resolution and image quality, you can stretch it using AffineTransform during WindowResize events without significant distortion. This will allow you to handle the JOptionPane and image size inconsistencies mentioned below.
class ImageBackgroundPane extends JOptionPane { private BufferedImage img; public ImageBackgroundPane (BufferedImage image) { this.img = image; } @Override public void paint(Graphics g) {
source share