Como mudar a cor do JFrame

2 respostas
R

Olá pessoal gostaria de saber como mudar a cor da minha janela.

Desde já agradeço.

2 Respostas

cs.santos0

setBackground

public void setBackground(Color c)

Sets the background color of this component.

The background color affects each component differently and the parts of the component that are affected by the background color may differ between operating systems.

Parameters:
    c - the color to become this component's color; if this parameter is null, then this component will inherit the background color of its parent
Since:
    JDK1.0
See Also:
    getBackground()

de acordo com a API…

psandrelli
setBackground(Color.LIGHT_GRAY);
Criado 4 de janeiro de 2008
Ultima resposta 4 de jan. de 2008
Respostas 2
Participantes 3