C
Claus K.
Hello everyone,
I have written this small applet GUI some time ago (more as proof of
concept than anything else); now there actually is a new requirement
for it.
The applet GUI is basically a telnet client, with some custom
functionality built in, which is all working fine.
However, now the stream output arriving should be coloured when there
is colour specified.
The first version was just written in plain AWT, with all the telnet
color code removed via regex.
Now, I am looking for what to do.
I have found the swing Components, of course, and it appears as if I
could do exactly what I want with a JTextPane, but the Document
instance as model behind is confusing me a bit.
Can I just add the stream output to the document with color
information when specified and update the JTextPane to show the
document again? How does that work with limiting scrollback and fast
arriving data over the stream?
I have written this small applet GUI some time ago (more as proof of
concept than anything else); now there actually is a new requirement
for it.
The applet GUI is basically a telnet client, with some custom
functionality built in, which is all working fine.
However, now the stream output arriving should be coloured when there
is colour specified.
The first version was just written in plain AWT, with all the telnet
color code removed via regex.
Now, I am looking for what to do.
I have found the swing Components, of course, and it appears as if I
could do exactly what I want with a JTextPane, but the Document
instance as model behind is confusing me a bit.
Can I just add the stream output to the document with color
information when specified and update the JTextPane to show the
document again? How does that work with limiting scrollback and fast
arriving data over the stream?