import java.awt.Color;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
public class Main {
public static void main(String... args) throws Exception {
JPanel panel = new JPanel();
panel.setOpaque(true);
panel.setBackground(Color.RED);
java.net.URL url = new java.net.URL(
"http://www.w3cschool.cn/style/download.png");
ImageIcon image = new ImageIcon(url);
JLabel label = new JLabel("LABEL", image, JLabel.RIGHT);
panel.add(label);
JOptionPane.showMessageDialog(null, panel, "Modified JOptionPane : ",
JOptionPane.PLAIN_MESSAGE);
}
}