swing gui设计.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
swing gui设计

Collection API ArrayList Vector Reflection API Collections API 收集是代表一个对象组的单个对象,被认为是它的元素。 Collections :没有具体顺序的一组对象 Set :没有复制的一组对象 List :有序对象组,允许复制 收集中,代表一个对象组的单个对象被认为是它的元素;对象的类型都有一个特殊的种类,即它们都是从一个共同父类型延续来的。 Java支持Vector,Bits, Stack, Hashtable, LinkedList等。 Stack实现后进先出(LIFO)的顺序 Hashtable提供一个相关的对象数组。 API还包括诸如HashSet, ArraySet, ArrayList, LinkedList和Vector等等的类,它们实现这些接口。 API还提供了支持某些算法的方法,如:排序,二进制搜索,评估列表中的最小和最大,以及收集等。 通过Iterators, 获取Collections结构中的element 无序的Set List结构的Iterators可以使用next 和previous方法遍历 Reflection API For each class, the Java Runtime Environment (JRE) maintains an immutable Class object that contains information about the class With the reflection API, you can invoke methods on a Class object which return Constructor , Method , and Field objects. You can use these objects to get information about the corresponding constructors, methods, and fields defined in the class. Class Class Instances of the class Class represent classes and interfaces in a running Java application. Class has no public constructor. Retrieving Class Objects If an instance of the class is available Class c = mystery.getClass(); retrieve the Class object for the superclass TextField t = new TextField(); Class c = t.getClass(); Class s = c.getSuperclass(); know the name of the class at compile time Class c = java.awt.Button.class; the class name is unknown at compile time, but available at runtime Class c = Class.forName(strg); * * Collections API Iterators Map结构由Key和Value对构成 Map Sorting arrays using Array.sort method: Sorting list using Collection.sort method: Void sort (List ) ; Void Sort ( List , Comparator ) ; The comparable and comparator interfaces Comparable: compareTo(element : Object): int Comparator: compare(e1: Object, e2:Object) : int Comparator: equals (Object, Object ) : blooean Sorting a set using a SortedSet implementation Sorting Array and Collections Vector implements the List interface Stack is a subclass of Vector push/pop/peek method Hasht

文档评论(0)

guoxiachuanyue + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档