countmine.java

来自「一个不是很经典的找雷游戏」· Java 代码 · 共 36 行

JAVA
36
字号
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package 挖雷游戏;/** * * @author Administrator */import javax.swing.*;import java.awt.*;public class CountMine {  int number;  JTextField textShowMine;  public CountMine(int number)  {    this.number=number;    textShowMine=new JTextField(5);    textShowMine.setFont(new Font("Plaint",Font.BOLD,24));   }  public void countMineSub()  {    number--;    if(number<=0) number=0;    textShowMine.setText(""+number);  }  public void countMineAdd()  {    number++;    textShowMine.setText(""+number);  }}

⌨️ 快捷键说明

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