Skip to content
Advertisement

Why won’t the background of my JFrame become black?

I’m working on a school project and I’m having trouble changing the background colour. For some reason it keeps showing up as the default grey colour instead of black.

JavaScript

Advertisement

Answer

You are replacing default content pane with yours one. so change background color after replacing content pane.

JavaScript

OR do

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement