public static void main( String[] args ) {
		Locale.setDefault( Locale.ENGLISH );
		System.setProperty( "sun.java2d.uiScale", "1x" );
		System.setProperty( FlatSystemProperties.UI_SCALE, "1x" );

		File keysFile = new File( "../flatlaf-theme-editor/src/main/resources/com/formdev/flatlaf/themeeditor/FlatLafUIKeys.txt" );

		// load existing keys file
		HashSet<String> keys = new HashSet<>();
		try( BufferedReader reader = new BufferedReader( new InputStreamReader(
			new FileInputStream( keysFile ), StandardCharsets.UTF_8 ) ) )
		{
			String key;
			while( (key = reader.readLine()) != null ) {
				keys.add( key );
			}
		} catch( IOException ex ) {
			ex.printStackTrace();
		}

		// collect keys used in Lafs
		collectKeys( FlatLightLaf.class.getName(), keys );
		collectKeys( FlatDarkLaf.class.getName(), keys );
		collectKeys( FlatIntelliJLaf.class.getName(), keys );
		collectKeys( FlatDarculaLaf.class.getName(), keys );
		collectKeys( FlatTestLaf.class.getName(), keys );

		// remove unused keys (defined in BasicLookAndFeel)
		keys.remove( "Button.textIconGap" );
		keys.remove( "Button.textShiftOffset" );
		keys.remove( "CheckBox.textIconGap" );
		keys.remove( "CheckBox.textShiftOffset" );
		keys.remove( "RadioButton.textIconGap" );
		keys.remove( "RadioButton.textShiftOffset" );
		keys.remove( "TabbedPane.contentOpaque" );
		keys.remove( "TabbedPane.selectedTabPadInsets" );
		keys.remove( "TabbedPane.shadow" );
		keys.remove( "TabbedPane.tabsOverlapBorder" );
		keys.remove( "ToggleButton.textIconGap" );
		keys.remove( "ToggleButton.textShiftOffset" );

		// write key file
		try( Writer fileWriter = new BufferedWriter( new OutputStreamWriter(
			new FileOutputStream( keysFile ), StandardCharsets.UTF_8 ) ) )
		{
			String[] sortedKeys = keys.toArray( new String[keys.size()] );
			Arrays.sort( sortedKeys );
			for( String key : sortedKeys ) {
				fileWriter.write( key );
				fileWriter.write( "\n" );
			}
		} catch( IOException ex ) {
			ex.printStackTrace();
		}
	}
Collects all FlatLaf UI defaults keys and dumps them to a file.

@author Karl Tauber
flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsKeysDump.java