Chapter 13 Creating User Interfaces
1. JComponent 类
可以为JComponent类增加边框:setBorder(Border)
如messagePanel.setBorder(new TitleBorder("Display Message"));
java.awt.Component的accessor和mutator:
(set/get)Font,Background,Foreground,PreferredSize
(is/set)visible
java.awt.Container:
add(Component)
add(Component, int index)
remove(Component)
(set/get)Layout
paintComponent
javax.swing.JComponent:
(set/get)ToolTipTest,Border
注:尽管JComponent是Container的子类,但一般不把按钮等控间当作容器处理。
2. 控间命名惯例:
jbt jchk jrb jlbl jtf jta jcbo jlst jscb jsld
JButton JCheckBox JRadioButton JLabel JTestField JTextArea JComboBox JList JScrollBar JSlider
3. javax.swing.AbstractButton 类
(set/get) ActionCommand, Text, Icon, PressedIcon, RolloverIcon, Mnemonic, HorizontalAlignment, HorizontalTextPosition, VerticalAlighment, VerticalTestPosition, IconTestGap
(set/is) BorderPainted, Selected
JButton 类
JButton()
JButton(Icon)
JButton(String)
JButton(String, Icon)

posts - 403, comments - 310, trackbacks - 0, articles - 7
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

2.9 Java notes

Posted on 2007-04-22 20:23 ZelluX 阅读(108) 评论(0)  编辑  收藏 所属分类: OOP
2007-02-09 20:32:44
只有注册用户登录后才能发表评论。


网站导航: