?? frame1.java
字號:
package usestroke;import java.awt.*;import java.awt.event.*;import javax.swing.*;public class Frame1 extends JFrame { MyPanel myPanel1 = new MyPanel(); /**Construct the frame*/ public Frame1() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } /**Component initialization*/ private void jbInit() throws Exception { this.setContentPane(myPanel1); this.setSize(new Dimension(380, 400)); this.setTitle("使用畫筆演示程序"); this.setResizable(false); } /**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 + -