Ask coding questions

← Back to all posts
How to change screen background in java
plscodeinjava

Title says it all, please help!!!!

Answered by Highwayman [earned 5 cycles]
View Answer
Voters
ShaziaKamboh
plscodeinjava
Comments
hotnewtop
Highwayman

The screen as in the terminal or the screen as in the actual like window screen for a Swing app or something

plscodeinjava

@Highwayman
As in the terminal, its NOT a swing app

Highwayman

Ah. There is no portable way(AFAIK) to change the terminal bgcolor, but you can use ansi escape codes on repl.it. Just look up "ANSI Escape code for XXX background" where XXX is the color. If you can’t find it I’ll just give it to you hope that helps
@amaddentcsec

plscodeinjava

@Highwayman
Some sites are blocked because of school, just give them to me thanks so much!!!!

Highwayman

Ok, it’s

@amaddentcsec

plscodeinjava

@Highwayman
Thats really not what i'm looking for though...

Highwayman

Ohh so.... hm. Ok so what if you did like you make a set_background() function that just sets the background and then outputs spaces for the entire screen and then just... uh... f. I’m sorry. That’s basically the only thing I know about for changing console colors is codes so...

@amaddentcsec