Alguem poderia por favor me dizer porque o codigo abaixo não funciona ?
public static void bot(){
JButton[]botoes=new JButton[200];
Integer k = 0;
while (k < 50){
botoes[k]=new JButton(k.toString());
botoes[k].setBounds(k+10, 0, 70, 70);
pa.add(botoes[k]);
botoes[k].setVisible(true);
k = k + 1;
}
pa.repaint();
pa.validate();
}
considerando que bot() eh chamado por meio de um botao num formulario internalframe e pa é um painel deste formulario.
Agradeço a ajuda.