正在加载图片...
76文本和字体Font类 ■Font类对象包含了对文档字体的完整定义。可以通过组件或图像对象的 getFomrMetrics()方法来获取 Fontmetrics类对象。 Font类的构造方法如下: public Font(String name, int style, nt size) 参数说明:字体的名称name可以取 Scan Serif.、 Monospace、 Dialog、 Serif、 DialogInput等之一,字型stye可以取 Font BOLD、 Font .ITALIC、 Font. PLAIN之一,字的大小sze为磅 ■Font类方法: public static Font get Font(string mf) public static Font getFont( String mf, Font font)7.6 文本和字体—Font类 ◼Font类对象包含了对文档字体的完整定义。可以通过组件或图像对象的 getFomrMetrics()方法来获取FontMetrics类对象。 ◼Font类的构造方法如下: public Font(String name,int style,int size) 参数说明:字体的名称name可以取ScanSerif、Monospace、Dialog、 Serif、DialogInput等之一,字型style可以取Font.BOLD、Font.ITALIC、 Font.PLAIN之一,字的大小size为磅 ◼Font类方法: public static Font getFont(String mf); public static Font getFont(String mf,Font font);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有