x Lelef

allora uno calmati .
due prima di farti grande ,chiedi perche non ho usato il code :
guarda un po perche!!

codice:
package cerea_oggetti; import javax.swing.JFrame; import javax.swing.JButton; /** * * @author salvax */ public class Cerea_oggetti { public static void bott(){ JButton bottoni[] = new JButton[10]; int giro=1; String nome[]= new String[10]; String indice[] = new String[10]; for(int x=0;x<bottoni.length;x++){ giro = +50 ; indice[x]= Integer.toString(x); bottoni[x] = new JButton(); bottoni[x].setSize(50,50); bottoni[x].setLocation(10+giro, 20); bottoni[x].setVisible(true); bottoni[x].setName(indice[x]); } } public static void set(){ JFrame corpo = new JFrame(); corpo.setLayout(null); corpo.setName("1"); corpo.setTitle("primo progetto reload"); corpo.setVisible(true); corpo.setSize(200, 200); corpo.setLocation(400, 200); } /** * @param args the command line arguments */ public static void main(String[] args) { bott(); set(); } }
il regolamento lo stralettooooo.