private Item[] getUIDefaultsItems() {
		UIDefaults defaults = UIManager.getDefaults();
		UIDefaults lafDefaults = UIManager.getLookAndFeelDefaults();

		Set<Entry<Object, Object>> defaultsSet = defaults.entrySet();
		ArrayList<Item> items = new ArrayList<>( defaultsSet.size() );
		HashSet<Object> keys = new HashSet<>( defaultsSet.size() );
		Color[] pBaseColor = new Color[1];
		for( Entry<Object,Object> e : defaultsSet ) {
			Object key = e.getKey();

			// ignore non-string keys
			if( !(key instanceof String) )
				continue;

			// ignore internal keys
			if( ((String)key).startsWith( "FlatLaf.internal." ) )
				continue;

			// ignore values of type Class
			Object value = defaults.get( key );
			if( value instanceof Class )
				continue;

			// avoid duplicate keys if UIManager.put(key,value) was used to override a LaF value
			if( !keys.add( key ) )
				continue;

			// resolve derived color
			Object info = null;
			if( value instanceof DerivedColor ) {
				Color resolvedColor = resolveDerivedColor( defaults, (String) key, (DerivedColor) value, pBaseColor );
				if( resolvedColor != value )
					info = new Color[] { resolvedColor, pBaseColor[0] };
			}

			// check whether key was overridden using UIManager.put(key,value)
			Object lafValue = null;
			if( defaults.containsKey( key ) )
				lafValue = lafDefaults.get( key );

			// add item
			items.add( new Item( String.valueOf( key ), value, lafValue, info ) );
		}

		return items.toArray( new Item[items.size()] );
	}
Creates a UI defaults inspector panel that can be embedded into any window.
flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java