Gente eu tenho o seguinte método:
public JanelaTest(byte[]r, byte []g, byte []b){
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(500,350);
setVisible(false);
imagem=new JLabel[r.length];
for(int i=0; i<r.length; i++){
imagem[i]= new JLabel();
Color c = new Color(r[i],g[i],b[i]);
imagem[i].setSize(70,70);
imagem[i].setLocation(location,0);
location=location+70;
imagem[i].setBackground(c);
imagem[i].setVisible(true);
add(imagem[i]);
}
}
}
Eu recebo três vetores de bytes, contendo cada cor RGB. Porém, quando eu faço Color c = new Color(r[i],g[i],b[i]) dah erro, pois ele apenas aceita valores de 0 à 254, como devo converter?