失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > java五子棋网络版源码_网络版五子棋的java源代码.pdf

java五子棋网络版源码_网络版五子棋的java源代码.pdf

时间:2019-08-06 22:40:32

相关推荐

java五子棋网络版源码_网络版五子棋的java源代码.pdf

网络版五子棋的java源代码.pdf

还剩

44页未读,

继续阅读

下载文档到电脑,马上远离加班熬夜!

亲,很抱歉,此页已超出免费预览范围啦!

如果喜欢就下载吧,价低环保!

内容要点:

*更改姓名Panel。*/publicclassRenam ePanel extendsJPanel {publicJTextFieldrenam e =newJTextField("请输入新名称", 20);publicJButtonnam eChangeButton =newJButton("更改姓名");publicRenam ePanel() {setLayout(newFlowLayou*此外还可以在文本框中输入命令如changenam e、list等。*/publicclassInputPanel extendsJPanel {JPanel pan1=newJPanel(newFlowLayout(FlowLayout.LEFT));JPanel pan2=newJPanel(newFlowLayout(FlowLayout.LEFT));publicJTextFieldinppublicJTextFieldinputIP=newJTextField("localhost", 10);publicJButtonconnectButton=newJButton("连接主机");publicJButtoncreatGam eButton =newJButton("新建游戏");publicJButtonjoinGam eButton =newJButton("进入游戏");函数//是对方客户端也看到己方的落子位置。ChessPaint(Integer.parseInt(chessOpt[0]), Integer.parseInt(chessOpt[1]), Integer.parseInt(chessOpt[2]));}elseif(recMessage.startsWith("/yournam e ")){chesspad.chessSelpackageorg.shan.chesspanel;im port java.io.IOException;im port java.util.StringTokenizer;publicclassChessThreadextendsThread{ChessPanel chesspad;publicChessThread(ChessPanel chesspad){this.chesspad=chpublicvoidm ouseClicked(MouseEvent e){}}/***表示黑子的类*/classchessPoint_blackextendsCanvas{ChessPanel chesspad=null;chessPoint_black(ChessPanel p){setSize(20, 20);chesspad=p;}publicvoidpaint(Graphicsg){g.if(isWin==false){this.add(chesspoint_white);chesspoint_white.setBounds(chessPoint_a*20- 7,chessPoint_b*20- 7, 16, 16);statusText.setText("白(第"+chessWhiteCount +"步)"+chessPoint_a+""+chessPoint_b+",请黑棋下chesspoint_white.setBounds(chessPoint_a*20- 7,chessPoint_b*20- 7, 16, 16);statusText.setText(&q

发表评论

暂无评论,赶快抢占沙发吧。

如果觉得《java五子棋网络版源码_网络版五子棋的java源代码.pdf》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。