Download site for GUI Finder


Tool to find where a Java GUI component is created.

Feature list

Installation

  1. Download this file
  2. Unzip the file (The unzipped directory must be writable when the tool is running)
  3. Add the following to the run command / launch:
        -javaagent:"<Directory>/gui-finder-1.2.4.jar"
      e.g.
        -javaagent:"/home/allan/Mit/Java/GUI Finder/GUI Finder/jars/gui-finder-1.2.4.jar"
  4. If you are using JDK version 17 or higher you MUST add the following to the run command / launch:
        --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/java.beans=ALL-UNNAMED
  5. Delete the downloaded ZIP file (Optional)

Uninstallation

  1. Delete the unzipped files
  2. Remove the added configuration change

The newest version is: 1.2.4
Release notes

Use

Advanced usage

By entering "start" or "stop" in the console, printing can be started or stopped
By entering "EDTv" in the console, it is possible to turn the "Event Dispatch Thread validation" function on and off. The function checks that no GUI changes are made from other than the Event Dispatch Thread. It is as default off.
By clicking on a listener in the inspector (See next line), information about where the listener was created is printed on the console / standard output.
By entering "inspector" (or just "i") in the console, the GUI Finder Inspector (A window with components from the current window) will be displayed
The window contains the following information per component (Can be hidden individually): The following elements of the GUI can be changed (CANNOT BE SAVED!) in this window:

Recommended setup

Debug feature

By inserting the following code in main, it is possible to debug the component that is clicked on:
GUIFinderProperties.setDebugObject(new GUIFinderDebugObject() {
    public void debug(Component component) {
        // Insert your debug code here
        // The component parameter contains the click on component
    }
});

Known Errors / Limitations

Marking (Made via Glass pane) of the component that is clicked only works in Swing (+J) and thus not in AWT (-J).
If GUI Finder needs to run with Property Finder, it must be version 1.0.1 or newer.
If GUI Finder needs to run with Out Finder, it must be version 1.0.3 or newer.
If you are use JDK 11 (or higher), you will get a "OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended" warning, when using this tool. I am not bright enough to make it go away.
    It can be hidden by added the VM arguments "-Xshare:off" to your launch configuration. Note: You might lose some performance by doing this.

Known error: GUI Finder does not work

Setup

System property Meaning
GUIFinder.noPrint false: (Default) The component is highlighted and stack trace is printed when a component is clicked
true: GUI Finder doesn't do anything when a component is clicked
GUIFinder.noThread false: (Default) The GUI Finder responds to console entries (e.g.: "start" or "stop")
true: GUI Finder does not respond to console entries.
GUIFinder.noGlassPane false: (Default) If a component is clicked, GUI Finder will marked it
(Made via glass pane and can therefore affect existing glass panes. However, the affect will only last as long as the component is marked)
true: GUI Finder does not marked the click on component
GUIFinder.noClassName false: (Default) If a component is clicked, the GUI Finder will display the name of the class of the component above it
true or GUIFinder.noglasspane=true: GUI Finder does not display the class name
GUIFinder.noProcessEventStack false: (Default) If a component is clicked, GUI Finder prints the entire stack trace in the console
true: GUI Finder will print the stack trace without the process event stack in the console
GUIFinder.excludeClassList Via GUIFinder.excludeClassList you can specify classes that you do not want to include at the top of the stack trace (e.g. component factories).
The class prefixes are separated by ';'. If the property starts with "+;" then the default class prefixes "java.", "javax." and "sun." will be added.
GUIFinder.outputFileName The output from the GUI Finder can be printed to a file via -DGUIFinder.outputFileName=<file name>
Default: Output is sent to the current console
GUIFinder.propertyFileName If specified, properties will be loaded from this file.
By using a file a common set of GUI Finder properties, can be used in several launches.
GUIFinder.EDTv false: (Default) Event Dispatch Thread validation is turned off at startup
true: Event Dispatch Thread validation is on during startup
(Can be changed manually via the console command "EDTv". See above)

Development

My source code Other dependencies
See the List of projects page for other projects.


Last Updated: 2026-01-30 15:27:54

Copyright Allan Rasmussen©