importjava.awt.*; importjava.awt.event.*; classChessPadextendsPanelimplementsMouseListener,ActionListener {intx=-1,y=-1,棋子颜色=1; Buttonbutton=newButton("重新开局"); TextFieldtext_1=newTextField("请黑棋下子"), text_2=newTextField(); ChessPad() {setSize(440,440);