这是一个AWT工具箱。它提供对本地GUI最低层次的JAVA访问。在大多情况下,这个类不直接用在小应用程序或应用程序中。具有把行图形数据转换为可显示的图像、返回字体信息、得出显示尺寸和分辨率以及获得系统属性信息的方法。


举例:列举本地可用字体名: 
import java.awt.*; 
public class FontList{ 
public static void main(String[] arg){ 
ToolKit tk=ToolKit.getDefaultToolKit(); 
String[] fontList=tk.getFontList(); 
for(int i=0;i<fontList.length;i++){ 
System.out.println(fontList[i]); 

System.exit(0); 

}

同上,列举系统有关可用信息: 
tk.getColorModel(); 
tk.getScreenResolution(); 
tk.getScreenSize();

等等。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2021-09-30
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-10-03
  • 2021-09-21
相关资源
相似解决方案