📄 myapplet.java
字号:
/* * 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -