正在加载图片...
图形上下文与图形对象 Graphics context(图形上下文) 用于在屏幕上绘图 Graphics对象管理图形上下文 Graphics类是一个抽象基类,必须派生出具 体子类以实现绘图功能。 类 Component有一个 paint方法,采用一个 Graphics对象作为参数 public void paint( Graphics g 通过调用类 Component的 repaint方法来调用 paInt 2021/2/24 北京理工大学计算机系(共48页)2021/2/24 北京理工大学计算机系(共48页) 8 图形上下文与图形对象 ◼ Graphics context(图形上下文) ◼ 用于在屏幕上绘图 ◼ Graphics对象管理图形上下文 ◼ Graphics类是一个抽象基类,必须派生出具 体子类以实现绘图功能。 ◼ 类Component 有一个 paint方法,采用一个 Graphics 对象作为参数 public void paint( Graphics g ) ◼ 通过调用类Component的repaint方法来调用 paint
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有