play[i].setName("象 1");
}
//士
in = new ImageIcon("image\\黑士.GIF");
for (i=12,k=195;i<14;i++,k+=114){
play[i] = new JLabel(in);
play[i].setBounds(k,56,55,55);
play[i].setName("士 1");
}
//卒
in = new ImageIcon("image\\黑卒.GIF");
for (i=16,k=24;i<21;i++,k+=114){
play[i] = new JLabel(in);
play[i].setBounds(k,227,55,55);
play[i].setName("卒 1" + i);
}
//炮
in = new ImageIcon("image\\黑炮.GIF");
for (i=26,k=81;i<28;i++,k+=342){
play[i] = new JLabel(in);
play[i].setBounds(k,170,55,55);
play[i].setName("炮 1" + i);
}
//将
in = new ImageIcon("image\\黑将.GIF");
play[30] = new JLabel(in);
play[30].setBounds(252,56,55,55);
play[30].setName("将 1");
//红色棋子
//车
in = new ImageIcon("image\\红车.GIF");
for (i=2,k=24;i<4;i++,k+=456){
play[i] = new JLabel(in);
play[i].setBounds(k,569,55,55);
play[i].setName("车 2");
}
//马
in = new ImageIcon("image\\红马.GIF");
评论0
最新资源