ahi te va
//capturas el numero ingresado por ejemplo N = NUMERO INGRESADO
//EJEMPLO N = 11
//MODIFCALO PZ
JButton [ N ] Botones = {new JButton("Add"),
new JButton("Save"),
new JButton("Edit"),
new JButton("Cancel"),
new JButton("Del"),
new JButton("Search"),
new JButton("Firts"),
new JButton("Previous"),
new JButton("Next"),
new JButton("Last"),
new JButton("Exit")};
//Se crea un contenedor MyPanel
Container MyPanel = this.getContentPane();
MyPanel.setBackground(new Color(37, 70, 165));//Se pone Color
MyPanel.setLayout(null);//Se pone Nul para mover los Objetos con SetBounds
//agregas los botones al panel
for(int i = 0; i < Botones.length; i++) {
MyPanel.add(Botones[i]);
}
Botones[0].setBounds(410,100,80,25);
Botones[1].setBounds(410,150,80,25);
Botones[2].setBounds(410,200,80,25);
Botones[3].setBounds(410,250,80,25);
Botones[4].setBounds(410,300,80,25);
Botones[5].setBounds(410,350,80,25);
Botones[6].setBounds(20,420,100,25);
Botones[7].setBounds(140,420,100,25);
Botones[8].setBounds(250,420,100,25);
Botones[9].setBounds(390,420,100,25);
Botones[10].setBounds(870,700,80,25);