0

Currently,I am using ANTLR to develop a interpreter for some specific area language by myself,

you could think it as something like MATLAB.And I want to make a terminal that do 3 things:

1) input command for interpret in black color.

2) output result to user in black color ,as well as error info in red color

3) output hyperlink to help info in underline style,where user click the link,then related help window show .

Some good software like VIM,MATLAB both use this kind of color text and hyperlink for users.

for currently,I have referenced 342990 and realized requirements 2;

referenced insert String to JTextPane as hyperlink and realized requirements 3.

But how to redirect system.in to a JTextPane correctly,the link 9244108

haven't sovled it , it didn't work for me.

Redirect system.in to JTextPane or JTextArea may have a lot job with buffer process,it seemd hard for me.

Any one who can give me some suggestion is really appreciated.

Community
  • 1
  • 1
wangdq
  • 1,874
  • 17
  • 26

0 Answers0