squarepoint.java

来自「一个魔板游戏课程设计的java源代码,做的不错的.」· Java 代码 · 共 46 行

JAVA
46
字号
import java.awt.*;
import javax.swing.JButton;

public class SquarePoint
{
   int x,y;
   boolean 有方块;
   JButton  block=null;                   
   Container con=null;
   public SquarePoint(int x,int y)
   {
      this.x=x;
      this.y=y;
   }
  public boolean get有方块()
  {
    return 有方块;
  }
  public void set有方块(boolean boo)
  {
    有方块=boo;
  }
 
  public int getX()
  {
    return x;
  }
  public int getY()
  {
    return y;
  }
  public void setBlock(JButton block,Container con)
  {
     this.con=con;
     this.block=block;
     con.add(block);
     block.setLocation(x,y);
     有方块=true;
     con.validate(); 
  }
  public JButton getBlock()
  {
     return block;
  }
}

⌨️ 快捷键说明

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