Set Color in JOptionPane

In this section, you will learn how to set color in JOptionPane.

In this section, you will learn how to set color in JOptionPane.

Set Color in JOptionPane

In this section, you will learn how to set color in JOptionPane. Now to do
this, we have used UIManager class which is responsible for look and feel. Using
following key value pair, we have set the background color for JOptionPane and
Panel.