Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inspecting Component Hierarchy in Java UI

We have a very large Java Swing desktop application comprising of a great deal of views. Developers have done a pretty good job over the years in choosing appropriate class locations which reflect the general structure of our UI for these views. Most of this time this is very helpful in tracking down specific components that have bugs which need tending to. However, there are cases where finding a panel, dialog, etc is quite painful. It usually involves searching our properties files for unique string sequences that appear in the UI.

Does anyone know of a third-party tool that allows a developer to hook into a Swing application and click on a region of the UI to reveal that name/package/hierarchy of the component that was clicked?

like image 944
S73417H Avatar asked Feb 26 '23 10:02

S73417H


1 Answers

SwingExplorer is the perfect tool for that. It does what you are describing, and even more (step-by-step drawing of Java2D, EDT violations, AWT events).

like image 51
barjak Avatar answered Mar 07 '23 12:03

barjak