📄 ellsworthapplet.java
字号:
import java.awt.*;
public class EllsworthApplet extends javax.swing.JApplet {
public void paint(Graphics screen) {
Graphics2D screen2D = (Graphics2D)screen;
String line1 = '\u0022' + "The advancement of the arts, from year";
String line2 = "to year, taxes our credulity, and seems";
String line3 = "to presage the arrival of that period";
String line4 = "when human improvement must end." + '\u0022';
String quote = line1 + line2 + line3 + line4;
String speaker = "Henry Ellsworth";
String title = "U.S. Commissioner of Patents";
String from = "1843 Annual Report of the Patent Office";
screen2D.drawString(line1, 5, 50);
screen2D.drawString(line2, 5, 80);
screen2D.drawString(line3, 5, 110);
screen2D.drawString(line4, 5, 140);
screen2D.drawString(speaker, 25, 170);
screen2D.drawString(title, 25, 200);
screen2D.drawString(from, 25, 230);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -