jminebutton.java

来自「开源Java扫雷游戏JMine2.0Jar新版功能完善」· Java 代码 · 共 54 行

JAVA
54
字号
/**
 * This program is written by Jerry Shen(Shen Ji Feng) use the technology of
 * SWING GUI and the OO design
 * 
 * @author Jerry Shen all rights reserved.
 * Email:jerry.shen@cognizant.com; jerry_shen_sjf@yahoo.com.cn
 * Please report bug to these emails.
 * Open source under GPLv3
 * 
 * version 2.0
 */
import javax.swing.ImageIcon;
import javax.swing.JButton;

@SuppressWarnings("serial")
public class JMineButton extends JButton {
	/**
	 * 
	 */
	private int col;
	private int row;
	private int flag = 0;
	private boolean clickFlag = false;

	JMineButton(int col, int row, ImageIcon icon) {
		super(icon);		
		this.col = col;
		this.row = row;
	}

	public boolean getClickFlag() {
		return (clickFlag);
	}

	public void setClickFlag(boolean toSet) {
		clickFlag = toSet;
	}

	public int getCol() {
		return (col);
	}

	public int getRow() {
		return (row);
	}

	public void setFlag(int flag) {
		this.flag = flag;
	}

	public int getFlag() {
		return (flag);
	}
}

⌨️ 快捷键说明

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