copybutton.java

来自「正在学习Java的人或许能从中得到自己想要的东西」· Java 代码 · 共 28 行

JAVA
28
字号
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.border.*;
import javax.accessibility.*;

import java.awt.*;
import java.awt.event.*;
import java.util.*;


public class CopyButton extends JButton 
implements Command {
    Mediator med;            //copy of the Mediator
    public CopyButton(ActionListener fr, 
                      Mediator md) {
        super("Copy");         //create the button
        addActionListener(fr); //add its listener
        med = md;              //copy in the Mediator instance
        med.registerCopy(this); //register with the Mediator   
    }
    public void Execute() {                         //execute the copy
        med.Move();
    }
}

⌨️ 快捷键说明

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