Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java/swing: console component?

I am looking for a component I can use in Swing that acts as a GUI console which

  • has a text area with scrollbars that can be set to a particular font
  • has an InputStream and an OutputStream that a host application can obtain
  • accepts keyboard input, prints it onto the end of the console text, and sends that input to the InputStream
  • prints the OutputStream text to the end of the console
  • has some kind of FIFO-ish property whereby the amount of text displayed in the console can be limited by automatically discarding the oldest text, when appropriate
  • allows copy (but not cut or paste or any other editing) of the console text to the system clipboard

This is kind of like the Console tab in Eclipse.

Are there any good libraries that provide this?

like image 741
Jason S Avatar asked May 10 '10 19:05

Jason S


2 Answers

Does this suffice?

like image 173
Bozho Avatar answered Oct 15 '22 20:10

Bozho


Here is an in-development open source library that does most of what is needed for a console:

  • https://github.com/mikera/swing-console
like image 31
mikera Avatar answered Oct 15 '22 19:10

mikera