To find the class of a window, first, from the System Transcript, select Options → Inspect → Window under pointer, then click the window. Or do Options → Inspect → Window Class under pointer, then click the window.
To find the class of a widget, do Options → Inspect → Window under pointer, then click the window. In the inspector that appears, execute 'self parent owner' to find the class that owns the widget.