各位大哥public void actionPerformed(ActionEvent e) { 怎样实现java五子棋重置游戏按钮??
packagejavaapplication4;importjava.awt.*;importjava.awt.event.*;importjavax.swing.JOp...
package javaapplication4;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
class ChessPad extends Panel implements MouseListener,ActionListener{
int array[][]=new int[19][19];
Scan scanp=new Scan();
Scan scanc=new Scan();
AutoPlay autoPlay=new AutoPlay();
Evaluate evaluatep=new Evaluate();
Evaluate evaluatec=new Evaluate();
Sort sort=new Sort();
int i=0;
int x=-1,y=-1,棋子颜色=1;
Button button=new Button("重新开局");
TextField text_1=new TextField("请黑棋下子"),
text_2=new TextField(),
text_3=new TextField();
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == button) {
}
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
} 展开
import java.awt.*;
import java.awt.event.*;
import javax.swing.JOptionPane;
class ChessPad extends Panel implements MouseListener,ActionListener{
int array[][]=new int[19][19];
Scan scanp=new Scan();
Scan scanc=new Scan();
AutoPlay autoPlay=new AutoPlay();
Evaluate evaluatep=new Evaluate();
Evaluate evaluatec=new Evaluate();
Sort sort=new Sort();
int i=0;
int x=-1,y=-1,棋子颜色=1;
Button button=new Button("重新开局");
TextField text_1=new TextField("请黑棋下子"),
text_2=new TextField(),
text_3=new TextField();
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == button) {
}
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
} 展开
1个回答
2014-04-06
展开全部
界面全清除,重绘棋盘 。
追问
其实有一个棋盘,可是太长了,写不下!!这个Java五子棋程序有一些问题,不知道怎么改了。。。求助各位大哥啊。。。能不能把邮箱发给我,帮我看看!拜谢
追答
事实上,就是重新初始化整个棋盘
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询