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

📄 simpleapplet.java

📁 Java the UML Way 书中所有源码
💻 JAVA
字号:
/*
 * SimpleApplet.java  V.H & E.L. 2001-08-10 
 */

import java.awt.*;
import javax.swing.*;

public class SimpleApplet extends JApplet {
  public void init() {
    Container content = getContentPane();
    Drawing aDrawing = new Drawing();
    content.add(aDrawing);
  }
}

class Drawing extends JPanel {
  public void paintComponent(Graphics window) {
    super.paintComponent(window);  // Remember this!
    setBackground(Color.green);
    window.drawString("Hello hello", 50, 50);
    window.drawOval(40, 30, 100, 40);
  }
}

⌨️ 快捷键说明

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