⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myframe.java

📁 java绘图 java awt 经典绘图的例子,对于初学awt模块的人非常有帮助.
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package awt;import java.awt.Button;import java.awt.Color;import java.awt.Dimension;import java.awt.Font;import java.awt.Frame;import java.awt.Graphics;import java.awt.Panel;import java.util.logging.Level;import java.util.logging.Logger;/** * * @author zhaolin */public class MyFrame extends Frame {    @Override    public void paint(Graphics g) {        super.paint(g);        Font f = new Font("黑体",Font.BOLD+Font.ITALIC,20);        g.setFont(f);        g.drawString("World", 200, 200);    }    public static void main(String[] args) {        MyFrame f = new MyFrame();        f.setSize(300,240);        f.setVisible(true);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -