How do I customize the title bar for a window, frame, or dialog?

John Zukowski

Starting with the 1.4 release, you can provide your own window adornments or decorations.

   import java.awt.*;
   import javax.swing.*;

   public class AdornSample {

     public static void main(final String args[]) {
       Runnable runner = new Runnable() {
         public void run() {
           // specify that newly created JFrames should be
	   // decorated by the L and F
           JFrame frame = new JFrame("Adornment Example");
           frame.setSize(300, 100);
You can also use setWindowDecorationStyle() to change the style for different types of windows. To customize what actually is used requires you to modify the look and feel.