SOS!! JButtons!!

Amaia
27 de Abril del 2006
Hola: Por favor necesito ayuda, que estoy muy atascada!!!

Tengo un problemilla con escribir en un JButton, tengo una matriz de
9x9 JButtons, y otra con numeros tambien de 9x9, y quiero que las
elejidas se escriban en los botones y no me funciona!!!

JButton botones[][];
int matriz_solucion[][];

botoiak= new JButton[9][9];
matriz_solucion= new int[9][9]; //la matriz_solucion se llena luego con numeros,todas las casillas

for(int x=0;x<=8;x++)
{
for(int y=0;y<=8;y++)
{
botones[x][y] = new JButton();
}
}

...

botones[1][5].setActionCommand("jButton62");
botones[1][5].setMargin(new Insets(0, 0, 0, 0));
botones[1][5].setBounds(new Rectangle(64, 312, 36, 36));
botones[1][5].addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
jButton15_actionPerformed(e);
}
});
botones[0][1].setActionCommand("jButton21");
botones[0][1].setMargin(new Insets(0, 0, 0, 0));
botones[0][1].setBounds(new Rectangle(28, 166, 36, 36));
botoiak[0][1].addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
jButton01_actionPerformed(e);
}
});

.....

public void zenbakiak_marraztu()
{
for(int i=0;i<=8;i++)
{
for(int j=0;j<=8;j++)
{
if(matrize[i][j].jarrita)
{
botones[i][j].setText(Integer.toString(matriz_solucion[i][j])); ??? no me escribe
}
}
}
botones[0][0].setText("4"); y así tampoco!!!!!!!!

}

GRACIAS¡¡¡¡¡¡¡¡