?? solong.java
字號:
import java.awt.*;
public class SoLong extends javax.swing.JApplet {
public void paint(Graphics screen) {
Graphics screen2D = (Graphics2D)screen;
Font f = new Font("monospaced", Font.BOLD, 18);
FontMetrics fm = getFontMetrics(f);
screen2D.setFont(f);
String s = "So long, and thanks for all the fish.";
int x = (getSize().width - fm.stringWidth(s)) / 2;
int y = getSize().height / 2;
screen2D.drawString(s, x, y);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -