Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting text in the console

Status
Not open for further replies.

stormbind

Technical User
Mar 6, 2003
1,165
GB
Hi,

Is there a way to format the text in the console? What about color, clear, &c?

Thanks :)

--Glen :)

Memoria mihi benigna erit qui eam perscribam
 
There are certainly no standard packages to do this ASFAIK.

So, you will be looking for a java library which interfaces with a native library to do it. For example, on linux, one uses ncurses to get coloured text etc. You don't state your OS, so I cannot really answer you, though I did find this link, which looks promising, for linux :


--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Humn, OS is Mac + Windows :(

Thanks anyway :)

--Glen :)

Memoria mihi benigna erit qui eam perscribam
 
Which windows?
Older Windows - I guess till win98 - came with ansi.sys installed, so you could easily use escape-sequences for colored characters and cursor positioning.

Newer windowses still have ansi.sys on board, but don't activate it.

They are pretty similar, but I think I can remember some subtle differences.

For an example look here:

The unprintable character can be inserted with cut'n'paste, or with an hexeditor.
It is ascii (27) or 0x1B.

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top