I'm trying to set the random color of JButton object by:
button.setBackground(Color.getColor(null,(int) (Math.random() * 255 + 1)));
but it only produces different shades of blue. Thanks.
Aucun commentaire:
Enregistrer un commentaire