Java图形化编程.pptVIP

  • 35
  • 0
  • 约1.71万字
  • 约 76页
  • 2017-06-21 发布于湖北
  • 举报
Java图形化编程

设置字体 例:将字符串写在面板的中央 import java.awt.*; import javax.swing.*; import java.awt.geom.*; import java.awt.font.*; public class FontTest { public static void main(String[]args){ FontFrame f = new FontFrame(); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setVisible(true); } } Java 设置字体 例:将字符串写在面板的中央 class FontFrame extends JFrame{ public FontFrame(){ this.setTitle(Font Window); this.setSize(DEFAULT_WIDTH,DEFAULT_HEIGHT); this.setLocation(this.getWidth()/4,this.getHeight()/4); this.add(new FontPanel()); } public static final int DEFAU

文档评论(0)

1亿VIP精品文档

相关文档