I have two classes, one AnalogClock class and one MainInterface class.
I’ve created a timeChanged method in the AnalogClock class and it gets called whenever the time has changed. My AnalogClock is basically a JPanel with a drawing. In MainInterface I setup a JFrame and add an Object of my AnalogClock.
Is it possible to change the Title of my Window whenever ‘timeChanged’ is called? I tried to use getParent() or getRootParent() but they don’t recognise setTitle().
Use
getWindowAncestormethod fromSwingUtilities.