When developing Java Swing GUIs, is it always a bad idea to extend JFrame? And what about JPanel, or other JComponents? Also, what makes it bad?
Usually it's a rule of thumb to only subclass if you need to customize the Swing component.
来源:https://stackoverflow.com/questions/9742018/is-it-always-a-bad-idea-to-extend-jframe