1 / 10
文档名称:

java 围棋.doc

格式:doc   大小:50KB   页数:10页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

java 围棋.doc

上传人:xunlai783 2018/1/7 文件大小:50 KB

下载得到文件列表

java 围棋.doc

相关文档

文档介绍

文档介绍:package weiqi;
import .*;
import .*;
import ;
public class Chess extends Frame
{
/**
*
*/
private static final long serialVersionUID = -6638650552294956227L;
ChessPad chesspad= new ChessPad();

Chess()
{
add(chesspad);
(70,90,440,440);

Label label=new Label("请先输入双方名称点击‘确认’点击‘开始’初始化游戏!",);
add(label);
(70,55,440,24);
();

addWindowListener
(
new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
(0);
}
}
);

setLayout(null);
setVisible(true);
setSize(600,550);
}

public static void main(String args[])
{
Chess chess=new Chess();
}
}
class ChessPad extends Panel implements MouseListener, ActionListener,FocusListener
{
int x = -1, y = -1, chessColor = 1;

String blackname="",whitename="";
Button button=new Button("开始");
Button inputButton=new Button("确认");

TextField text_1=new TextField("黑方执子"),
text_2=new TextField("白方执子"),//white please
text_3=new TextField("黑方名称"),
text_4=new TextField("白方名称");

ChessPad()
{
add(inputButton);
(35,5,60,26);
(this);
(this);

add(text_3);
(115,5,90,24);
(this);