Example usage for javax.swing JOptionPane getBackground

List of usage examples for javax.swing JOptionPane getBackground

Introduction

In this page you can find the example usage for javax.swing JOptionPane getBackground.

Prototype

@Transient
public Color getBackground() 

Source Link

Document

Gets the background color of this component.

Usage

From source file:edu.ucla.stat.SOCR.chart.Chart.java

/**
 * make the content of the popup dialog highlightable
 * @param m//  w  w  w . j  a  v a2s  .co m
 */
public void showMessageDialog(String m) {
    JOptionPane popup = new JOptionPane();
    JTextArea msg = new JTextArea(m);
    Color bg = popup.getBackground();
    msg.setBackground(bg);
    popup.showMessageDialog(this, msg);
}