I am curious, I am wondering if there exist a way to make the top of the JOptionPane into a different color, say red or orange. Also i was wondering how to change the image
There are three options here:
Use one of the predefined icons using the respective message type:
JOptionPane.showMessageDialog(frame, "Eggs are not supposed to be green.", "Inane error", JOptionPane.ERROR_MESSAGE);
Use a custom icon:
JOptionPane.showMessageDialog(frame, "Eggs are not supposed to be green.", "Inane custom dialog", JOptionPane.INFORMATION_MESSAGE, icon);
Use a look & feel to have consistent icons all over your application: How to Set the Look and Feel
Have a look at this page of the Java Tutorial for more information on dialogs.