Swing编程学习(一)

 
Swing的类结构
大部分的Swing类是由AWT的类前面加个字母“J”构成的,Swing也有自己的许多类。下面这个图就是Swing类的树图。
y1pnein_qeE00rFUpjve37AmPYMjOh-LTOaezkXDrMNhcnj3ONvTqHi7OgSKXbNHMua
Z-order
还没有确实弄清楚是什么东西。
What this ultimately means is that you should avoid using both heavyweight and lightweight components in the same container whenever possible. The most important rule to follow is that you should never place heavyweight components inside lightweight containers that commonly support overlapping children.

Swing package overview

javax.swing Contains the most basic Swing components, default component models and interfaces. (Most of the classes shown in figure 1.2 are contained in this package.)
 
javax.swing.border Contains the classes and interfaces used to define specific border styles. Note that borders can be shared by any number of Swing components, as they are not components themselves.
 
javax.swing.colorchooser
Contains classes and interfaces that support the JColorChooser component, which is used for color selection. (This package also contains some interesting undocumented private classes.)
 
javax.swing.event
Contains all Swing-specific event types and listeners. Swing components also support events and listeners defined in java.awt.event and java.beans.
 
javax.swing.filechooser
Contains classes and interfaces supporting the JFileChooser component used for file selection.
 
javax.swing.plaf Contains the pluggable look and feel API used to define custom UI delegates. Most of the classes in this package are abstract. They are subclassed and implemented by look and feel implementations such as Metal, Motif, and Basic. The classes in this package are intended for use only by developers who, for one reason or another, cannot build on top of an existing look and feel.
 
javax.swing.plaf.basic
This package is the Basic look and feel implementation on top of which all look and feels provided with Swing are built. We are normally expected to subclass the classes in this package if we want to create our own customized look and feel.
 
javax.swing.plaf.metal
Metal is the default look and feel of Swing components; it is also known as the Java look and feel. It is the only look and feel that ships with Swing which is not designed to be consistent with a specific platform.
 
javax.swing.plaf.multi
This package is the Multiplexing look and feel. This is not a regular look and feel implementation in that it does not define the actual look or feel of any components. Instead, it provides the ability to combine several look and feels for simultanteous use. A typical example might be using an audio-based look and feel in combination with metal or motif.
 
javax.swing.table
Contains classes and interfaces that support the JTable control. This component is used to manage tabular data in spreadsheet form. It supports a high degree of customization without requiring look and feel enhancements.
 
javax.swing.text
Contains classes and interfaces used by the text components, including support for plain and styled documents, the views of those documents, highlighting, caret control and customization, editor actions, and keyboard customization.
 
javax.swing.text.html
Contains support for parsing, creating, and viewing HTML documents.
 
javax.swing.text.html.parser
Contains support for parsing HTML.
 
javax.swing.text.rtf
Contains support for RTF (rich text format) documents.
javax.swing.tree
Contains classes and interfaces that support the JTree component. This component is used for the display and management of hierarchical data. It supports a high degree of customization without requiring look and feel enhancements.
 
javax.swing.undo
Contains support for implementing and managing undo/redo functionality.

7DBDF42EE58F4A79!222:thumbnail

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值