We would like to know how to install Custom icon for JOptionPane.
import java.net.URL; //from ww w . j a va 2 s.c om import javax.swing.ImageIcon; import javax.swing.JOptionPane; import javax.swing.UIManager; public class Main { public static void main(String[] args) throws Exception { ImageIcon icon = new ImageIcon(new URL( "http://www.java2s.com/style/download.png")); UIManager.put("OptionPane.informationIcon", icon); JOptionPane.showMessageDialog(null, "Hello!"); } }