Click to See Complete Forum and Search --> : JOptionPane and color


lisa alben
September 27th, 2000, 07:50 PM
Hello,

How do I change the color of an entire JOptionPane? My code below paints the edge around the JOptionPane white; however, the button's and text's background remains grey.

JOptionPane optPane = new JOptionPane(text, JOptionPane.PLAIN_MESSAGE);
optPane.setOpaque(true);
optPane.setBackground(Color.white);

JDialog dialog = optPane.createDialog(ePanel, item);
dialog.show();

Many thanks for your time!