⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jannetoolbartest.java

📁 java编程的一些Applets例子。值得深入研究一下。
💻 JAVA
字号:

/** 
 * Simple applet to test JanneToolbar class
 */
import java.awt.*;
import java.awt.image.*;
import java.applet.Applet;

public class JanneToolbarTest extends Applet {
   
   JanneToolbar toolbar;
   
   public void init() {
      // test setting of background
      setBackground(new Color(0xEED5B7));

      // get the images
      Image constr = getImage(getDocumentBase(), "images/construction.gif");
      Image newi = getImage(getDocumentBase(), "images/new.gif");
      Image info = getImage(getDocumentBase(), "images/info.gif");
      Image warning = getImage(getDocumentBase(), "images/warning.gif");
      Image caution = getImage(getDocumentBase(), "images/caution.gif");

      // create toolbar panel
      toolbar = new JanneToolbar(true, 4, true);
      toolbar.addButton(constr, "constr");
      toolbar.addButton(info, "info");
      toolbar.addButton(newi, "new");
      toolbar.addButton(warning, "warning");
      toolbar.addButton(caution, "caution");
      add(toolbar);
   }

   /**
    * Simple action to wite selected button to stdout
    */
   public boolean action(Event evt, Object arg) {
      if (evt.target instanceof JanneButton) {
	 System.out.println("Button selected: " + (String)arg);
      }
      return true;
   }
   
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -