necesitaria un codigo que me permitiese mediante un bucle crear X botones. Mi codigo es el siguiente y no se donde esta el fallo
vectorBotones = new ArrayList<JButton>();
int distancia = 10; // DISTANCIA A LA QUE SE COLCARÁ EL BOTON
boton = new JButton();
for (int i = 0; i < 3; i++) {
boton.setBounds(distancia, 10, 50, 50);
vectorBotones.add(boton);
//boton = null;
Panel.add(boton);
distancia=distancia+50; //esto es para que no se monten los botones, sino que el siguiente boton aparezca 10 + el mismo, es decir, mas el grosor del boton anteriormente creado
}
UN SALUDO