0

I wan to make my JOption's Border to be Black color. As you can see, its default color is blue. The blue color is required to be change to Black. I tried

JOptionPane optionPane = new JOptionPane(...., 
    JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);
 final JDialog dialog = optionPane.createDialog(parentComponent, title);
 dialog.getRootPane().setBorder( BorderFactory.createLineBorder(Color.Black) );

Is there any way to do this ?

enter image description here

Débora
  • 5,816
  • 28
  • 99
  • 171
  • 1
    http://stackoverflow.com/questions/2482971/how-can-i-change-the-color-of-titlebar-in-jframe.it might be impossible .you can change color of title bars by changing windows settings.you can use undercoated dialog box with your own title bar – Madhawa Priyashantha Oct 11 '15 at 12:03
  • @FastSnail. Thanks for the Link. As its answers mention, there is no way to do it, because the border is controlled by the OS / native colors ? – Débora Oct 11 '15 at 12:08

0 Answers0