r/javahelp • u/Dedishen • Dec 19 '25
How do you make an all-text window in java?
I want to make a java program open a window that just contains text. I want the text to stay on a uniform grid ('.' And 'w' would have the same length, ect.), sorta like the game 'Galactic'. I would like it if I could change the colour/background colour of each character. I have tried to find out how to do this, but none of the results were what I wanted. How would I do this?
3
Upvotes
1
u/AutoModerator Dec 19 '25
Moderator Announcement Read More »
} You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
9
u/Ok_Substance1895 Dec 19 '25
Do you mean a terminal window? If so, look at JLine. Otherwise, if you mean a window on the OS desktop, JavaFX is a Java GUI implementation. Electron or Tauri are HTML/CSS/JavaScript alternatives to that.
8
u/wggn Dec 19 '25
you mean like a TextArea with a monospace font?
https://jenkov.com/tutorials/javafx/textarea.html
3
u/CubicleHermit Dec 19 '25
Look into Lanterna ( https://github.com/mabe02/lanterna ) or one of the libraries for making roguelike games.
1
u/DrPeeper228 Dec 19 '25
Do you mean a terminal window?
1
u/SpritualPanda Dec 20 '25
In bottom of ide?(its terminal ) Or otherwise open a new separate window? (Its GUI) specify which one