I'm stuck on this for hours. I should make UML class diagram for Swing application in a college project. I envisioned one main screen from which I can open one of several screens depending on chosen option. All of those screens have several identical components (like application logo, log out button etc).
Now, I've read it's not recommended to inherit JFrame so I avoided putting those in a class that inherits JFrame that is again inherited by those other classes but somehow it also does not seem okay to not have inheritance and instead list those components as attributes in every class.
So, what IS the right way to do it?