This is quiet simple to change the background color of the JOtionPane. You can simply make use of the code below which will help you to get the the background changed:
Code:
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.plaf.ColorUIResource;
public class Background
{
public static void main(String[]args)
{
UIManager UI=new UIManager();
UI.put("OptionPane.background",new ColorUIResource(255,0,0));
UI.put("Panel.background",new ColorUIResource(255,0,0));
JOptionPane.showMessageDialog(null,"Techanera.in","Forum", JOptionPane.INFORMATION_MESSAGE);
}
}
Bookmarks