SwingSpy is simple resident Swing introspector. It shows hierarchy of dialog elements under the cursor.


Add Jodd distribution jar to classpath (if it is not already there;) and somewhere at the startup of Swing application invoke the following code:

    try {
    } catch (Exception ex) {
        System.err.println("SwingSpy is not installed... " + ex.toString());


Once installed, SwingSpy may be invoked by pressing the hot-key combination: ctrl+shift+click. This popups the SwingSpy dialog that shows complete hierarchy of active Swing dialog and some raw object data on the right. Clicked component will be expanded in the hierarchy three. While SwingSpy is active, user may hover the cursor over swing dialog and component under the cursor will be highlighted. During that time, cursor will be followed by word: "Spy". By clicking the hotkey again over some other component, SwingSpy will locate it in the hierarchy three. SwingSpy may be exited by closing its dialog. It remains resident until the next use.


swingspy1 swingspy2