JFrame 与 Frame
JFrame是Frame的子类
- Frame is part of java.awt package and exists since JDK1.0. JFrame is part of javax.swing package and exists since JDK1.1.3 or something.
- Frame extends Window.
JFrame extends Frame. - You can directly add components to Frame. You add components to JFrame.getContentPane().
- JFrame implements javax.swing.RootPaneContainer and javax.accessibility.Accessible interface. Frame does not. By virtue of that JFrame gets all the benefits that you get from JRootPane using a delegation model. e.g. you can set the border on ((JComponent) JFrame.getRootPane()).setBorder(...)
- JFrame directly supports javax.swing.JMenuBar.
- JFrame supports setting of close operation.
。。。未完待续
posted on 2017-12-23 10:06 Deltadeblog 阅读(173) 评论(0) 编辑 收藏 举报