First of all, that wont work..Plus the array would be indexed out of bounds if it did. What are you trying to do with the chars? If I knew, I could give you some better code:
JButton[] myButtons = new JButton[10];
char mine = '*';
for (int i=0; i<myButtons.length; i++)
{
myButtons[i] = new JButton(" ");
myButtons[i].addActionListener(this);
}
public void actionPerformed(ActionEvent ae)
{
//choose three buttons you want as bombs
if (ae.getSource() == myButtons[0])
{
myButtons[0].setText(mine + "");
}
else if (ae.getSource() == myButtons[1])
{
myButtons[1].setText(mine + "");
}
else if (ae.getSource() == myButtons[2])
{
myButtons[2].setText(mine + "");
}
}
I guess that's something like what your wanting...If it's not, give me some more information, and I can help some more.