myapplet.java
来自「This book code procedure according to th」· Java 代码 · 共 36 行
JAVA
36 行
/* * MyApplet.java * * Created on 2005年12月2日, 上午12:05 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package com.example.applet;import java.awt.Graphics;/** * * @author Admin */public class MyApplet extends javax.swing.JApplet { /** Creates a new instance of MyApplet */ public MyApplet() { } String mEcho;//初始化 public void init() { mEcho = "Hello! my name is Applet!"; }//输出文字 public void paint(Graphics g) { //在窗口的指定位置绘制文字 g. drawString(mEcho,size().width/2,size().height/2); } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?