⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 squarepoint.java

📁 一个魔板游戏课程设计的java源代码,做的不错的.
💻 JAVA
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -