I am doing a euromillion program and i need some help. I have this code and i would like to set a size for the JButton. I dont know how to do it
Can someone tell me what do i have to change?
static JButton[][] botoes = new JButton[5][10];
static JButton [][] estrelas = new JButton[4][3];
public void grafica(){
GridLayout layoutBotoes = new GridLayout(5,10);
GridLayout layoutEstrelas = new GridLayout(4,3);
um.setLayout(layoutBotoes);
dois.setLayout(layoutEstrelas);
for(i=0;i<5;i++){
for(l=0;l<10;l++){
cont++;
botoes[i][l] = new JButton(""+cont);
um.add(botoes[i][l]);
botoes[i][l].addActionListener(this);
}
}
cont=0;
for(i=0;i<4;i++){
for(l=0;l<3;l++){
if(i==3 && l==2) {
break;
} else {
cont++;
estrelas[i][l] = new JButton(""+cont);
dois.add(estrelas[i][l]);
estrelas[i][l].addActionListener(this);
}
}
}
}