jminebutton.java
来自「功能简单易实现的五个JAVA小程序,有五子棋,聊天程序,扫雷程序,俄罗斯方块,J」· Java 代码 · 共 39 行
JAVA
39 行
/**
* This program is written by Jerry Shen(Shen Ji Feng)
* use the technology of SWING GUI and the OO design
*
* @author Jerry Shen(jerry.shen@cognizant.com)
* Distributed under the licience of GPLv3
* all rights reserved.
*/
import javax.swing.*;
public class JMineButton extends JButton {
private int col;
private int row;
private int flag=0;
private boolean clickFlag = false;
JMineButton(int row, int col, ImageIcon icon) {
super(icon);
this.row = row;
this.col = col;
}
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 + -
显示快捷键?