how to change top of window in java

Java
UIDefaults uiDefaults = UIManager.getDefaults();
uiDefaults.put("activeCaption", new javax.swing.plaf.ColorUIResource(Color.gray));
uiDefaults.put("activeCaptionText", new javax.swing.plaf.ColorUIResource(Color.white));
JFrame.setDefaultLookAndFeelDecorated(true);
Source

Also in Java: