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.
。。。未完待续
JFrame 与 Frame的更多相关文章
- JFrame Frame 窗口关闭
JFrame是Frame的子类,即JFrame继承自Frame. JFrame是javax.swing.JFrame的类,Frame是java.awt.Frame的类. 类似的还有JButton.Bu ...
- Frame练习-打开图片
import java.awt.EventQueue; import java.awt.event.*; import java.io.*; import javax.swing.*; public ...
- JFrame背景
1.引言 在了解了JFrame面板的相关知识后,我们可以选择在RootPane根面板或LayeredPane面板中设置背景图案. 2.方法 对于大小固定的窗口背景设置如下: //导入图案 ImageI ...
- java中利用JFrame创建窗体 【转】
1. 一个简单的swing public class Test(){ public static void main(String[] args){ JFrame frame = new JFrame ...
- JFrame、JDialog close
package common; import javax.swing.JFrame; import javax.swing.SwingUtilities; /*2015-5-26*/ public c ...
- JFrame、JPanel 、Layout开发的简单例子
写了Java这么久,居然发现想手写一个带网格袋布局的JFrame,还不记得怎么写,写了这么多代码真不敢说记得所有细节. 幸好,只要记清楚概念就能快速开发.首先,明确一下3种容器类的差别和用途: No. ...
- 【java】详解JFrame结构的分层
在这篇博文中,笔者会介绍JFrame窗口的分层.JFrame继承自Frame,同JFrame.JDialog.JApplet都是重量级组件.如果不弄清楚Frame的分层结构,那么在设置组件的某些特效的 ...
- JFrame 居中显示
场景: 在利用 JAVA 的 Swing 开发 C/S 架构 的前端界面 目的: 想让 JFrame 居中显示在整个 屏幕的正中位置 方法一:计算窗体的左上角坐标 JFrame fram ...
- java代码swing编程 制作一个单选按钮的Frame
不善于思考,结果费了时间,也没有效果 下面的框框可以做出来. package com.kk; import javax.swing.JFrame; import javax.swing.JLabel; ...
随机推荐
- java连接MySql数据库 zeroDateTimeBehavior
JAVA连接MySQL数据库,在操作值为0的timestamp类型时不能正确的处理,而是默认抛出一个异常, 就是所见的:java.sql.SQLException: Cannot convert va ...
- PaodingAnalysis 提示 "dic home should not be a file, but a directory"
Exception in thread "main" net.paoding.analysis.exception.PaodingAnalysisException: dic ho ...
- OC NSArray数组排序
一.一般排序 // 排序 NSArray *arr = @["]; NSArray *newarr = [arr sortedArrayUsingSelector:@selector(com ...
- forget word a out 1
a 1★ a 不,非,无;在~ 的 2★ ab 相反,变坏,离去 3★ abs 相反,变坏,离去
- NOIP初赛 BLESS ALL!
祝初赛顺利!RP++! 下午再写一篇题解来加RP
- spoj8406
题解: 二分+树状数组 记录以下i在当前拍第几 代码: #include<bits/stdc++.h> using namespace std; ; int a[N],f1[N],f2[N ...
- QueryPerformanceFrequency
var c1: int64; t1, t2: int64; QueryPerformanceFrequency(c1); QueryPerformanceCounter(t1); // GetSell ...
- Flask初级(八)flash与前台交互get post 简介
Project name :Flask_Plan templates:templates static:static 两种 HTTP 请求方法:GET 和 POST在客户机和服务器之间进行请求-响应时 ...
- 关于const的一些注意事项
1.const对象必须初始化,一旦创建其值就无法更改 2.默认情况下,const对象仅在文件内有效,若想在多个文件中使用同一个const对象,就是不在每个文件独立的定义一个const对象,可以进行如下 ...
- nested exception is java.sql.SQLException: Incorrect string value: '\xE7\x99\xBB\xE9\x99\x86...' for column 'image' at row 1
HTTP Status 500 - Hibernate operation: could not insert: [cn.itcast.shop.product.vo.Product]; uncate ...