Core Java2 6th 摘要(6)
来源:互联网 发布:2016人才缺口it 编辑:程序博客网 时间:2024/05/17 21:21
内部类是定义在其他类内部的类。使用内部类的原因有以下四个:
- 内部类对象能够访问创建它的对象的实现——包括那些私有数据;
- 内部类能够隐藏起来,不为同一包中的其他类所见;
- 匿名内部类可以方便地定义运行时回调;
- 使用内部类在编写事件驱动的程序时用起来很方便。
局部类不会使用访问指示符(如public或者private)来声明。它们的范围总是限定在声明它们的程序快中。
你可以在运行时使用代理创建实现了一组给定接口的新类。只有在编译时无法确定要实现哪些接口时,才有必要使用代理。
<script type="text/javascript"><!--google_ad_client = "pub-2823374497557651";google_ad_width = 468;google_ad_height = 60;google_ad_format = "468x60_as";google_ad_type = "text_image";//2007-08-15: FileMidgoogle_ad_channel = "0152175912";google_color_border = "FFFFFF";google_color_bg = "FFFFFF";google_color_link = "000000";google_color_text = "000000";google_color_url = "008000";//--></script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Java中的顶层窗口(即那些没有包含在其他窗口中的窗口)被称为框架。
框架是一个容器。这意味着一个框架可以容纳按钮、文本域等其他用户界面组件。
JFrame类中几个可能最为重要的方法:
- dispose方法:关闭窗口并收回用于创建窗口的任何系统资源;
- setIconImage方法:当窗口最小化(在Java中常常称作图标化)时,把一个Image对象作为图标;
- setTitle方法:改变标题栏中的文字;
- setResizable方法:使用boolean参数来决定框架大小是否能被用户改变。
- Core Java2 6th 摘要(6)
- Core Java2 6th 摘要(1)
- Core Java2 6th 摘要(2)
- Core Java2 6th 摘要(3)
- Core Java2 6th 摘要(4)
- Core Java2 6th 摘要(5)
- Core Java2 6th 摘要(7)
- Core Java2 6th 摘要(8)
- Java2.6**
- core java2
- Core Java2(7Th) study(1)What sorts of problems do you need to consider?
- Core Java2(7Th) study(2)The situations that when to throw exception!
- JAVA2核心技术卷I:基础知识 (学习摘要)
- [Core Java. Volume I. Fundamentals, 8th Edition]-6
- Java2游戏编程读书笔记(6)
- 译作:《Core Java2 7e》之 Reflection
- Core Java2 Volume学习小结1
- 《JAVA2核心技术 卷一 基础知识(原书第七版)》《Core java2,Volume I-Fondamentsls Seven Edition》 学习笔记(一)
- API函数大集合
- Spring中使用MappingSQLQuery封装JDBC结果集实例
- SOA and Web 2.0: 边缘与中心间的重心移转(二)
- SQL Server数据库优化方案
- 规范?!
- Core Java2 6th 摘要(6)
- 单点登录
- 初试javax.mail
- CListCtrl基本用法
- 精妙SQL语句收集(转)
- windows下安装opengl的glut库
- Runescape Rare Items – Holiday Drops
- 业务敏捷与SOA
- 考研政治