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

📄 tuttlebuttondemonstration.java

📁 its a kind of tutorial.
💻 JAVA
字号:
// Filename TuttleButtonDemonstration.java.
// A demonstration test harness for the TuttleButton class.
// 
// Written for the Java Interface book, Chapter 5.
// Fintan Culwin, v 0.1, April 1996


import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import Tuttles.TuttleButton;


public class TuttleButtonDemonstration extends    Applet 
                                       implements ActionListener {
                                                            
  public void init() {

  TuttleButton leftTuttleButton;
  TuttleButton rightTuttleButton;

     this.setBackground( Color.white);
     
     leftTuttleButton  = new TuttleButton( "greyltutt.gif", this);
     leftTuttleButton.setActionCommand( "Left  button");
     leftTuttleButton.addActionListener( this);
     this.add( leftTuttleButton);
     
     rightTuttleButton = new TuttleButton( "greyrtutt.gif", this, Color.red);
     rightTuttleButton.setActionCommand( "Right button");
     rightTuttleButton.addActionListener( this);     
     this.add( rightTuttleButton);         
  } // end init()


  public  void actionPerformed( ActionEvent event) { 
     System.out.println( event.getActionCommand() + " pressed.");                     
  } // End actionPerformed.                          
} // end class TuttleButtonDemonstration.










⌨️ 快捷键说明

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