Search code examples
javaswingpainttitlebar

How Can I customise the TitleBar of JDialog , JOptionPane?


Is there any way I can remove the white title bar and change it to black?I am working on making my own look and feel, how can we change the color of it so that all the derivatives that have the title bar should have a black title bar instead of white.

enter image description here


Solution

  • class MyJDialog extends JDialog{
    
      public MyJDialog(){
         super()
         // add the text and button here including positioning
      }
    
    }