private void filterChanged() {
		String filter = filterField.getText().trim();
		String valueType = (String) valueTypeField.getSelectedItem();

		// split filter string on space characters
		String[] filters = !filter.isEmpty() ? filter.split( " +" ) : null;
		Pattern[] patterns = (filters != null) ? new Pattern[filters.length] : null;
		if( filters != null ) {
			for( int i = 0; i < filters.length; i++ ) {
				filters[i] = filters[i].toLowerCase( Locale.ENGLISH );

				// simple wildcard matching
				//  - '*' matches any number of characters
				//  - '?' matches a single character
				//  - '^' beginning of line
				//  - '$' end of line
				String f = filters[i];
				boolean matchBeginning = f.startsWith( "^" );
				boolean matchEnd = f.endsWith( "$" );
				if( f.indexOf( '*' ) >= 0 || f.indexOf( '?' ) >= 0 || matchBeginning || matchEnd ) {
					if( matchBeginning )
						f = f.substring( 1 );
					if( matchEnd )
						f = f.substring( 0, f.length() - 1 );

					String regex = ("\\Q" + f + "\\E").replace( "*", "\\E.*\\Q" ).replace( "?", "\\E.\\Q" );
					if( !matchBeginning )
						regex = ".*" + regex;
					if( !matchEnd )
						regex = regex + ".*";
					patterns[i] = Pattern.compile( regex );
				}
			}
		}

		ItemsTableModel model = (ItemsTableModel) table.getModel();
		model.setFilter( item -> {
			if( valueType != null &&
				!valueType.equals( "(any)" ) &&
				!typeOfValue( item.value ).startsWith( valueType ) )
			  return false;

			if( filters == null )
				return true;

			String lkey = item.key.toLowerCase( Locale.ENGLISH );
			String lvalue = item.getValueAsString().toLowerCase( Locale.ENGLISH );
			for( int i = 0; i < filters.length; i++ ) {
				Pattern p = patterns[i];
				if( p != null ) {
					if( p.matcher( lkey ).matches() || p.matcher( lvalue ).matches() )
						return true;
				} else {
					String f = filters[i];
					if( lkey.contains( f ) || lvalue.contains( f ) )
						return true;
				}
			}
			return false;
		} );

		Preferences prefs = getPrefs();
		prefs.put( "filter", filter );
		prefs.put( "valueType", valueType );
	}
Creates a UI defaults inspector panel that can be embedded into any window.
flatlaf-extras/src/main/java/com/formdev/flatlaf/extras/FlatUIDefaultsInspector.java