第5章 构成用户界面的窗口环境 北京大学计算机系 代亚非
1 第5章 构成用户界面的窗口环境 北京大学计算机系 代亚非
构成用户界面的窗口环境 5.1使用AWT( Abstract window toc0li构件 5.2包含构件的构件构件容器( container) 53事件的传递 54各种构件的应用实例() 5.5外观的管理与控制 56各种构件的应用实例(二) 57总结
构成用户界面的窗口环境 2 5.1 使用AWT(Abstract Window Toolkit)构件 5.2 包含构件的构件----构件容器(container) 5.3 事件的传递 5.4 各种构件的应用实例(一) 5.5 外观的管理与控制 5.6 各种构件的应用实例(二) 5.7 总结
5.1使用AWT构件 在AWT的概念中,窗口系统所显示的各种对象 统称为构件: Button,Menu,List等等都是构 件 Component是代表构件最基本的类。 Component类中定义了各种窗口对象中最基本 最重要的方法和性质。随时随处都有可能利用 Component定义的方法
5.1 使用AWT构件 3 在AWT的概念中,窗口系统所显示的各种对象 统称为构件:Button,Menu,List等等都是构 件。 Component是代表构件最基本的类。 Component类中定义了各种窗口对象中最基本、 最重要的方法和性质。随时随处都有可能利用 Component定义的方法
5.1使用AWT构件 已经学过的: 没有学过的: getFont action, disable, enable, handleEvent, keyUp getBackground key Down, mouseUp, getForeground, hide mouseDown, inside, isEnable, mouseMove is Showing, is Visible, mouse Enter, locate, location mouseExit, move,setBackground, mouseDrag, repaint setForeground, show setFont, resize sve
5.1 使用AWT构件 4 已经学过的: getFont, handleEvent,keyUp keyDown,mouseUp, mouseDown, mouseMove, mouseEnter, mouseExit, mouseDrag, repaint setFont,resize 没有学过的: action, disable,enable, getBackground, getForeground,hide, inside,isEnable, isShowing,isVisible, locate,location, move,setBackground, setForeground,show, size
132包含构件的构件一构件容器( ontainer)5 列表按钮‖菜单 窗口,对话框 container 另一个窗口 container
5 列表 按钮 菜单 container 另一个窗口 窗口,对话框 5.2 包含构件的构件----构件容器(container) container