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

📄 displaywordframe.java

📁 Java 多媒体技术(附源码) Java 3D API JavaSound API 各种格式的多媒体数据文件 JBuilder开发环境
💻 JAVA
字号:
package displayword;import java.awt.*;import java.awt.event.*;import javax.swing.*;/** * <p>Title: DisplayWord</p> * <p>Description: 应用Java 2D API绘制文字</p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: 北京师范大学计算机系</p> * @author 张良博 * @version 1.0 */public class DisplayWordFrame extends JFrame {  public static final int DEFAULT_WIDTH = 300;  public static final int DEFAULT_HEIGHT = 200;  WordPanel panel;  Container contentPane;  BorderLayout borderLayout1 = new BorderLayout();  //Construct the frame  public DisplayWordFrame() {    enableEvents(AWTEvent.WINDOW_EVENT_MASK);    try {      jbInit();    }    catch(Exception e) {      e.printStackTrace();    }  }  //Component initialization  private void jbInit() throws Exception  {    //setIconImage(Toolkit.getDefaultToolkit().createImage(DisplayWordFrame.class.getResource("[Your Icon]")));    panel = new WordPanel();    contentPane = getContentPane();    contentPane.add(panel);    this.setSize(new Dimension(DEFAULT_WIDTH, DEFAULT_HEIGHT));    this.setTitle("应用Java 2D API绘制文字");  }  //Overridden so we can exit when window is closed  protected void processWindowEvent(WindowEvent e) {    super.processWindowEvent(e);    if (e.getID() == WindowEvent.WINDOW_CLOSING) {      System.exit(0);    }  }}

⌨️ 快捷键说明

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