获得字体名称 : 字体 « 二维图形 « Java 教程

En
Java 教程
1. 语言基础
2. 数据类型
3. 操作符
4. 流程控制
5. 类定义
6. 开发相关
7. 反射
8. 正则表达式
9. 集合
10. 线
11. 文件
12. 泛型
13. 本土化
14. Swing
15. Swing事件
16. 二维图形
17. SWT
18. SWT 二维图形
19. 网络
20. 数据库
21. Hibernate
22. JPA
23. JSP
24. JSTL
25. Servlet
26. Web服务SOA
27. EJB3
28. Spring
29. PDF
30. 电子邮件
31. 基于J2ME
32. J2EE应用
33. XML
34. 设计模式
35. 日志
36. 安全
37. Apache工具
38. 蚂蚁编译
39. JUnit单元测试
Java
Java 教程 » 二维图形 » 字体 
16. 23. 8. 获得字体名称
import java.awt.Font;
import java.awt.GraphicsEnvironment;
public class MainClass {
  public static void main(String[] a) {
    GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
    String[] fontnames = e.getAvailableFontFamilyNames();
    for (String s : fontnames) {
      System.out.println(s);
    }
  }
}
Agency FB
Arial
Arial Black
Arial Narrow
Arial Rounded MT Bold
Arial-SM
Blackadder ITC
Bodoni MT
Bodoni MT Black
Bodoni MT Condensed
Book Antiqua
Bookman Old Style
Bookshelf Symbol 7
Bradley Hand ITC
Calisto MT
Castellar
Century Gothic
Century Schoolbook
Comic Sans MS
Copperplate Gothic Bold
Copperplate Gothic Light
Courier New
Curlz MT
Dialog
DialogInput
Edwardian Script ITC
Elephant
Engravers MT
Eras Bold ITC
Eras Demi ITC
Eras Light ITC
Eras Medium ITC
Estrangelo Edessa
Felix Titling
Forte
Franklin Gothic Book
Franklin Gothic Demi
Franklin Gothic Demi Cond
Franklin Gothic Heavy
Franklin Gothic Medium
Franklin Gothic Medium Cond
French Script MT
Garamond
Gautami
Georgia
Gigi
Gill Sans MT
Gill Sans MT Condensed
Gill Sans MT Ext Condensed Bold
Gill Sans Ultra Bold
Gill Sans Ultra Bold Condensed
Gloucester MT Extra Condensed
Goudy Old Style
Goudy Stout
Haettenschweiler
Impact
Imprint MT Shadow
Kartika
Latha
Lucida Bright
Lucida Console
Lucida Sans
Lucida Sans Typewriter
Lucida Sans Unicode
Maiandra GD
Mangal
Marlett
Microsoft Sans Serif
Monospaced
Monotype Corsiva
MS Outlook
MS Reference Sans Serif
MS Reference Specialty
MV Boli
OCR A Extended
Palace Script MT
Palatino Linotype
Papyrus
Perpetua
Perpetua Titling MT
Pristina
Raavi
Rage Italic
Rockwell
Rockwell Condensed
Rockwell Extra Bold
SansSerif
Script MT Bold
Serif
Shruti
Sylfaen
Symbol
Tahoma
Tera Special
Times New Roman
Trebuchet MS
Tunga
Tw Cen MT
Tw Cen MT Condensed
Tw Cen MT Condensed Extra Bold
Verdana
Vrinda
Webdings
Wingdings
Wingdings 2
Wingdings 3
16. 23. 字体
16. 23. 1. java.awt.Fontjava.awt.Font
16. 23. 2. 创建serif字型创建serif字型
16. 23. 3. 创建粗体和斜体字体创建粗体和斜体字体
16. 23. 4. 显示字体鼠标点击
16. 23. 5. To change the size and/or style of a font, you call its deriveFont() methodTo change the size and/or style of a font, you call its deriveFont() method
16. 23. 6. 显示字体信息。
16. 23. 7. 系统所有可用的字体
16. 23. 8. 获得字体名称
16. 23. 9. 查看所有的系统字体查看所有的系统字体
16. 23. 10. 字体:字体选择字体:字体选择
16. 23. 11. 在网格上显示字体
16. 23. 12. 从字体创造字体
16. 23. 13. 系统字体显示系统字体显示
www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.