📄 键盘错误.java
字号:
/* * 键盘.java * * Created on 2004年9月25日, 上午10:16 *//** * * @author litertiger */import java.awt.*;import java.awt.event.*;public class 键盘错误 extends java.applet.Applet implements KeyListener{ Button b=new Button("我在这里"); /** Initialization method that will be called after the applet is loaded * into the browser. */ public void init() { b.addKeyListener(this); setLayout(null); add(b); b.setBounds(10,10, 30,30); // TODO start asynchronous download of heavy resources } public void keyPressed(KeyEvent e) { if(e.getKeyCode()==KeyEvent.VK_A) { b.setBounds(50, 60, 100,100); b.setBackground(Color.BLUE); } } public void keyReleased(KeyEvent e) { } public void keyTyped(KeyEvent e) { } public void paint(Graphics g) { g.drawString("鼠标松开了", 10,20); } // TODO overwrite start(), stop() and destroy() methods}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -