?? note.java~8~
字號:
package untitled2;import java.awt.*;import java.awt.event.*;import java.applet.*;public class note extends Applet { int i=10,j=10; Color mycolor; Font myfont; String str; boolean isStandalone = false; /**Get a parameter value*/ public String getParameter(String key, String def) { return isStandalone ? System.getProperty(key, def) : (getParameter(key) != null ? getParameter(key) : def); } /**Construct the applet*/ public note() { } /**Initialize the applet*/ public void init() { try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } /**Component initialization*/ private void jbInit() throws Exception { this.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(KeyEvent e) { this_keyPressed(e); } }); } /**Get Applet information*/ public String getAppletInfo() { return "Applet Information"; } /**Get parameter info*/ public String[][] getParameterInfo() { return null; } void this_keyPressed(KeyEvent e) { i+=20; if(i>200){ i=10; j=j+20; } str = String.valueOf(e.getKeyChar()); repaint(); } public void paint(Graphics g){ mycolor = new Color(155,155,155); g.setColor(mycolor); myfont = new Font("TimesRoman",Font.BOLD,20); g.setFont(myfont); g.drawString(str,i,j); } public void update(Graphics g){ paint(g); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -