Pro7on
04-06-2007, 16:13
cosė creo 15 button
JButton[] btn = new JButton[15];
for(int x=0;x<15;x++){
btn[x] = new JButton("btn"+x);
}
come faccio a crearne 15*15?
xche questo nn mi va...????:confused:
JButton[] btn = new JButton[15][15];
for(int y=0;y<15;y++){
for(int x=0;x<15;x++){
btn[x][y] = new JButton("btn"+x+y);
}
}
JButton[] btn = new JButton[15];
for(int x=0;x<15;x++){
btn[x] = new JButton("btn"+x);
}
come faccio a crearne 15*15?
xche questo nn mi va...????:confused:
JButton[] btn = new JButton[15][15];
for(int y=0;y<15;y++){
for(int x=0;x<15;x++){
btn[x][y] = new JButton("btn"+x+y);
}
}