exercise12_10.java

来自「java程序设计 机械工业出版社 书籍代码」· Java 代码 · 共 22 行

JAVA
22
字号
// Exercise12_10.java: Display a moving labelimport java.awt.*;import java.awt.event.*;import javax.swing.*;public class Exercise12_10 extends JFrame {  public Exercise12_10() {    this.getContentPane().add(new Fan());  }    // Main method  public static void main(String[] args) {    // Create a frame    Exercise12_10 frame = new Exercise12_10();    frame.setTitle("Exercise12_10: Running Fan");    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        // Display the frame    frame.setSize(200, 200);    frame.setVisible(true);  }}

⌨️ 快捷键说明

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