Use this snippet (is actually a fully functional class) to print all the UIManager key, or to filter them based on a keyword. In your case you want to check all the keys containing (ignore case for more results) a "close" string.
import java.util.Enumeration;
import javax.swing.UIManager;
public class Test {
public static void main(String[] args) {
printUIManagerKeys("close");
}
private static void printUIManagerKeys(String filter) {
String filterToLowerCase = filter.toLowerCase();
Enumeration<?> keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
String keyToString = key.toString().toLowerCase();
if (filter != null && keyToString.contains(filterToLowerCase)) {
System.out.println(key + " ( " + UIManager.getDefaults().get(key) + " )");
}
}
}
}
Output on the console:
InternalFrameTitlePane.closeButtonOpacity ( true )
PopupMenu.consumeEventOnClose ( false )
InternalFrame.paletteCloseIcon ( javax.swing.plaf.metal.OceanTheme$IFIcon@1fcb1a )
InternalFrame.closeSound ( sounds/FrameClose.wav )
InternalFrame.closeIcon ( javax.swing.plaf.metal.OceanTheme$IFIcon@100d6ea )
Tree.closedIcon ( sun.swing.ImageIconUIResource@1cc678a )
So next step is to get and see how the icon with the key InternalFrame.closeIcon
looks.