extendbutton.java

来自「一个简单的扫雷游戏代码,供大家交流学习.无需解码」· Java 代码 · 共 44 行

JAVA
44
字号
package ly.java;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class ExtendButton extends JButton
{
 private int Button_Pos;
 private boolean Button_Status;
 private boolean Button_Visited;

 public int SetPostion(int pos)
 {
  this.Button_Pos = (pos >= 0 && pos <= 81) ? pos : 0;
  return this.Button_Pos ;
 } 
 public int GetPostion()
 {
  return this.Button_Pos;
 }
 public boolean SetStatus(boolean sta)
 {
  this.Button_Status = sta;
  return this.Button_Status;
 }
 public boolean GetStatus()
 {
  return this.Button_Status;
 }
 public boolean Visited()
 {
  return this.Button_Visited;
 }
 public boolean SetVisited(boolean vis)
 {
  this.Button_Visited = vis;
  return this.Button_Visited;
 }
}

 

⌨️ 快捷键说明

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