svoid onTitleChanged(JInternalFrame f, Runnable r) { if (f != null && r != null) swing { f.addPropertyChangeListener(JInternalFrame.TITLE_PROPERTY, evt -> r.run()); } }