56 |
import javax.swing.JToggleButton; |
import javax.swing.JToggleButton; |
57 |
import javax.swing.JToolBar; |
import javax.swing.JToolBar; |
58 |
import javax.swing.SwingConstants; |
import javax.swing.SwingConstants; |
|
import javax.swing.UIDefaults; |
|
59 |
import javax.swing.UIManager; |
import javax.swing.UIManager; |
60 |
import javax.swing.border.AbstractBorder; |
import javax.swing.border.AbstractBorder; |
61 |
import javax.swing.border.Border; |
import javax.swing.border.Border; |
653 |
{ |
{ |
654 |
JOptionPane pane = (JOptionPane) f.getContentPane(); |
JOptionPane pane = (JOptionPane) f.getContentPane(); |
655 |
int type = pane.getMessageType(); |
int type = pane.getMessageType(); |
|
UIDefaults defaults = UIManager.getLookAndFeelDefaults(); |
|
656 |
if (type == JOptionPane.QUESTION_MESSAGE) |
if (type == JOptionPane.QUESTION_MESSAGE) |
657 |
{ |
{ |
658 |
Color bc = defaults.getColor( |
Color bc = UIManager.getColor( |
659 |
"OptionPane.questionDialog.border.background"); |
"OptionPane.questionDialog.border.background"); |
660 |
if (bc != null) |
if (bc != null) |
661 |
g.setColor(bc); |
g.setColor(bc); |
662 |
} |
} |
663 |
if (type == JOptionPane.WARNING_MESSAGE) |
if (type == JOptionPane.WARNING_MESSAGE) |
664 |
{ |
{ |
665 |
Color bc = defaults.getColor( |
Color bc = UIManager.getColor( |
666 |
"OptionPane.warningDialog.border.background"); |
"OptionPane.warningDialog.border.background"); |
667 |
if (bc != null) |
if (bc != null) |
668 |
g.setColor(bc); |
g.setColor(bc); |
669 |
} |
} |
670 |
else if (type == JOptionPane.ERROR_MESSAGE) |
else if (type == JOptionPane.ERROR_MESSAGE) |
671 |
{ |
{ |
672 |
Color bc = defaults.getColor( |
Color bc = UIManager.getColor( |
673 |
"OptionPane.errorDialog.border.background"); |
"OptionPane.errorDialog.border.background"); |
674 |
if (bc != null) |
if (bc != null) |
675 |
g.setColor(bc); |
g.setColor(bc); |