quindi come posso sfruttare i reference per far stampare i titoli?
windowForComponent restituisce come tipo un Window (superclasse di JFrame). E tu sai che le tue finestre sono JFrame, quindi l'oggetto fornito da windowForComponent sarà uno dei tuoi JFrame. Window non ha getTitle() ... JFrame sì ce l'ha. Quindi ....