squarepoint.java

来自「用java写的一个小游戏」· Java 代码 · 共 64 行

JAVA
64
字号
/* * SquarePoint.java * * Created on 2007年11月6日, 下午5:57 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */package PuzzleGame;/** * * @author baili */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.setBackground(new Color(12*16+12,255,255));     block.setLocation(x,y);     有方块=true;     con.validate();   }  public JButton getBlock()  {     return block;  }}

⌨️ 快捷键说明

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